• Resolved bbdesignpa

    (@bbdesignpa)


    Our site takes orders with different tax rates from many different countries. Most work fine. However, if a customer orders from Malaysia, the tax amount on the email receipt shows as 0.00. The tax amount is correct on the site from the customer’s perspective (“thank you” screen) and correct in WP Admin (viewing the order in WooCommerce). The total amount of the order in all three places is correct (includes the tax added in). It is just that the tax line on the email is 0.00 for some reason.

    For other countries, it shows fine (Germany, for example). Seems to be specific to Malaysia.

    The email preview I am able to see in WP Admin also shows the tax as the correct amount. In both cases (actual email and email preview), the data seems to come from this line of code, in the same PHP script:

    $item_totals = $order->get_order_item_totals();

    Then there is a foreach statement to loop through the various lines (subtotal, shipping, tax, payment method, total). In the preview (which is correct), I dumped the object and see this:

    [“fee_98447”]=> array(2) {
    [“label”]=> string(4) “Tax:”
    [“value”]=> string(134) “RM427.56”
    }

    But when the email is sent, I see this:

    [“fee_98446”]=> array(2) {
    [“label”]=> string(4) “Tax:”
    [“value”]=> string(132) “RM0.00”
    }

    Why would $order->get_order_item_totals() return two different tax amounts for the same order?

    I do note the different between fee_98447 and fee_98446, but not sure why they would be different, either. Related to the issue?

    I am having to dig through WooCommerce’s internal workings to research this, and it has me stumped. Hoping for a solution, but if anyone could point me in the right direction, or somewhere else to look, that would be a big help.

Viewing 1 replies (of 1 total)
  • Hello,

    It looks like this thread has been marked as resolved. Were you able to find a fix already? If you still need assistance, please let us know!

Viewing 1 replies (of 1 total)
  • The topic ‘Tax in email receipt incorrectly shows as 0.00’ is closed to new replies.