• Resolved Bibhash karn

    (@bibhashkarngmailcom)


    Hi,

    Hide if Zero in PDF Invoicing is not working after recent plugin update.

    It was working well up to Version 5.5.9. Shortcodes used is as below:

    [wcj_order_total_discount hide_if_zero=”yes” before=”<tr><th>Discount: </th><td>-” after=”</td></tr>”]

    Hoping for response in this matter.

    Thank You,
    Bibhash Karn

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author ronyp

    (@ronyp)

    Hello @bibhashkarngmailcom,

    Could you please elaborate on the issue? What is the exact issue? It would be great if you can share the expected and the current results so that we can get an exact idea.

    Kind Regards,
    RonyP – Support Team

    Thread Starter Bibhash karn

    (@bibhashkarngmailcom)

    Hello RonyP,

    Thank you for your response.

    The issue is to Hide the label “Discount” if discount is not allowed or not provided to the customer. The latest version shows the discount column even if the Discount is not provided to the customer.

    For Eg: Discount: -Rs 00.00 is shown in the latest updates of the plugin in the generated invoice but up to Version 5.5.9 this label “Discount” was not shown as the price was set to zero or there was no discount. We want to show this label only when the “Discount” is provided to the customer.

    Please let us know if any further information is required.

    Thank You,
    Bibhash Karn

    Plugin Author ronyp

    (@ronyp)

    Hello @bibhashkarngmailcom,

    Could you please make minor code changes as explained below and give them a try?

    File-path: /wp-content/plugins/woocommerce-jetpack/includes/shortcodes/class-wcj-shortcodes-orders.php

    On line number 254 in function “wcj_price_shortcode()”

    Please replace:

    if ('yes' === $atts['hide_if_zero'] && 0 == $raw_price)

    With:

    if ('yes' === $atts['hide_if_zero'] && (float)0 === $raw_price)

    If you still find it not working please replace your shortcode with the below:

    [wcj_order_total_discount hide_if_zero=yes before=”<tr><th>Discount: </th><td>-” after=”</td></tr>”]

    Kind Regards,
    RonyP – Support Team

    Thread Starter Bibhash karn

    (@bibhashkarngmailcom)

    Hello RonyP,

    Thank you for your response.

    The code if ('yes' === $atts['hide_if_zero'] && (float)0 === $raw_price) worked perfectly for us. Great plugin and thanks a lot for your kind support.

    The edited shortcode didn’t worked for us. Thought the provided code worked perfectly for us.

    File name was “class-wcj-orders-shortcodes.php” instead of “class-wcj-shortcodes-orders.php”

    Thank you once again,
    Bibhash Karn

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide if Zero in PDF Invoicing is not working after recent plugin update’ is closed to new replies.