This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 4 replies, has 2 voices.

Last updated by peterM-72 8 months, 3 weeks ago.

Assigned support staff: Andrey.

Author Posts
September 9, 2019 at 10:27 pm #4540411


I am trying to:
Only show prices excluding VAT for specific countries

hidden link (price are shown correctly including VAT)
hidden link (price are shown incorrectly including VAT)

It have been working correctly before, but today I just discovered that prices for our norweigan shop is shown incorrectly. Prices needs to be shown excluding VAT as they are not an EU country.

I've tried adding this code below to fix the issue, but it doesn't work:

// Filter woocommerce not to show tax for certain languages
function filter_woocommerce_calc_tax( $taxes, $price, $rates, $price_includes_tax, $suppress_rounding )
global $sitepress;
if(!is_admin() && $sitepress->get_current_language()=="nb_NO"){
$taxes = array( 1 => "float(0.000)" );
return $taxes;
// add the filter
add_filter( 'woocommerce_calc_tax', 'filter_woocommerce_calc_tax', 10, 5 );
September 10, 2019 at 8:44 am #4543201


Languages: English (English ) Russian (Русский )

Timezone: Europe/Kiev (GMT+03:00)

Did it stop working after some update has been done? Do I correctly understand that you haven't used this code before?

Could you show me an example on your site?

Please check if this is not the issue in your case:

If still the problem, make sure to clear the cache before doing new tests.

September 10, 2019 at 11:30 am #4544651


Hi again,

Yes we don't work with the german market, so the issue on your link is not relevant in this case.

I'm not sure which version we ran before, but the issue started before updating to the latest version. I'm not sure what might have caused this error, but since it was an agency that built our site originally, we need help investigating the cause as they are no longer in the picture.

If you go to hidden link (when entering the page you will be redirected to the swedish page, just re-enter the url and you will be allowed to stay) you can see that the price is 248.75 kr. If you add the product to the cart it will also say the same price and the sum will have the text "inkl mva." which means including taxes. If you then proceed to the cart via "Til kassen"-button you can see that the checkout recalculates the price correctly to exclude taxes.

Cache is flushed at least a couple of hundred times during the many hours of troubleshooting I've put into this.

September 10, 2019 at 11:31 am #4544699


Oh, we also just noticed that the price for € (euro) is shown correctly in the store, but are translated to the original currency in the backend and order management incorrectly.

September 10, 2019 at 10:17 pm #4549119


My issue is resolved now. Thank you!