WooCommerce: same price regardless of taxes

In my online shop, customers from the EU have to pay their country’s VAT rate. Customers from the USA, for example, do not have to pay any VAT. If I set the price to 15 Euros in WooCommerce and specify that the prices include taxes, the default behavior is the following:

Customers from a country for which a tax rate is specified pay 15 Euros including their country’s tax rate. Customers from countries without a specified tax rate pay less than 15 Euros. I am not sure, but I think in this case the price is reduced by the tax rate from the shop’s base location. The desired effect is that these customers pay 15 Euros too, but without any included taxes.

The WooCommerce wiki on GitHub has the solution for that. You only have to insert the following line of code into your theme or into a plugin:

add_filter( 'woocommerce_adjust_non_base_location_prices', '__return_false' );

Related posts

12 comments on »WooCommerce: same price regardless of taxes«

  1. Jonne

    Hi Florian,

    Where exactly should this code be inserted in WordPress? Somehow I cannot make my way thru this... Custom CCS does not work so it must be some other place..?

    Best regards,
    Jonne

    Reply
    1. Florian Brinkmann

      Hi Jonne,

      yes, that is a PHP snippet. You can insert it into the functions.php file of your theme (if you are not using a custom theme, you should create a child theme for that, so you do not loose the modification if the theme gets an update) or into a small plugin.

      Hope that helps,
      Florian

      Reply
  2. Jesper Bendsen

    Hi
    I just used this filter, defined the tax for US to 10%, the product price was 1000 and the tax calculated was 90.91. Any idea why tax is not calculated as 100?
    Thanks
    Jesper

    Reply
  3. Simon

    Perfect! Thank you so much. Spent several days trying to solve this by changing various setting in WooCommerce and installing different plugins, but this code did the trick. Thank you!

    Reply
  4. Martin

    Hi,
    how can i display the tax in the cart. With your snippet, it works perfectly except that i only see the tax for one country. If i switch the country in the cart. the tax is not shown.

    Reply
  5. Adnan Bitar

    Finally found out how to do this, thanks a lot!!

    How would you reckon taxes behave when I connect WooCommerce backend to a marketplace tool like Channable/Channelengine? These tools upload the products from Woocommerce to all kinds of marketplaces.

    Im guessing this will be a pain to get the price to stay the same, no?

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *