• Resolved SYNC4489

    (@sync4489)


    Hello,

    is there a way to disable the annoying addition of VAT in a VAT exempt order when the ‘Recalculate’ button is clicked in admin? I think I’ve read something in this forum, but can’t find it anymore…

    We sell a lot to VAT exempt customers, and every time that they ask to add/remove/modify items of an order, we modify from the wp-admin and when we click on ‘Recalculate’ the VAT is added.
    Then we have to remove VAT for each row of the order (sometimes tens of rows) and several times per day… it quickly becomes annoying! ??

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Diego

    (@daigo75)

    What you describe depends on WooCommerce. The VAT exemption is applied to a customer, during a checkout session. WooCommerce doesn’t carry that exemption over to the order. Due to that, when you recalculate an order total, WooCommerce applies taxes to it. This is WooCommerce’s behaviour, by design.

    A few months ago, we modified WooCommerce’s core, to add a way to check if an order is “VAT exempt”, and skip the tax calculations for it. This was added recently to the WC core. Thanks to this change, there are three ways to make an order VAT exempt:

    1. When a valid VAT number has been entered and stored against the order, the EU VAT Assistant intercepts the “is order VAT exempt” check performed by WooCommerce, returning true.
    2. If the order doesn’t have a valid VAT number, you can make it exempt by adding a custom meta, with key “is_vat_exempt” and value “yes”. WooCommerce will use that information to skip the calculation of taxes.
    3. If you need to make the order VAT exempt dynamically, you can write a filter for hook woocommerce_order_is_vat_exempt and return true to disable taxes.
    Thread Starter SYNC4489

    (@sync4489)

    Thanks for the clarification.

    So if I understand correctly, an order placed with a valid VAT number (and I’ve just verified that in the order meta is considered valid by the plugin) should be considered VAT exempt for any calculation, even in the admin, as described in case 1.

    But this doesn’t happen in our installation, we are on WP 4.9.10, Woo 3.5.6, and the latest version of your plugin.
    Could you please give me a clue as how/where the order VAT exemption intercept is done, so I can see if we have anything else installed that is blocking it?

    Plugin Author Diego

    (@daigo75)

    That’s correct. WooCommerce looks for the “vat exempt” meta on the order, and calls filter woocommerce_order_is_vat_exempt to allow 3rd parties to alter the result of that call. The call should be in file abstract-wc-order.php, in function calculate_taxes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to disable VAT when Recalculate is clicked?’ is closed to new replies.