Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 0 replies, has 0 voices.

Last updated by Andreas W. 1 day, 1 hour ago.

Assisted by: Andreas W..

Author Posts
January 7, 2025 at 9:08 am

andrejZ-5

Background of the issue:
I change VAT for Slovakia, because from 1.1.2025 we have new VAT.

Symptoms:
In other currencies showing price without VAT, even when should show Price with VAT.

Questions:
Why are prices in other currencies showing without VAT?
How can I ensure prices in other currencies include VAT?

January 7, 2025 at 10:47 am
January 7, 2025 at 6:35 pm #16571170

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I looks like there is a inconsistancy inside your tax settings. See screenshot.

Could you please fix this issue and then test again?

Best regards
Andreas

tax settings.jpg
January 8, 2025 at 8:35 am #16572391

andrejZ-5

Hi, I found out that problem is here:

add_filter( 'woocommerce_countries_allowed_countries', 'tk_wpml_no_checkout_switch');
function tk_wpml_no_checkout_switch($countries) {
if (is_admin()) return $countries;
if (ICL_LANGUAGE_CODE == 'cs') { unset($countries['SK']); unset($countries['HU']); unset($countries['PL']); unset($countries['AT']); unset($countries['RO']); unset($countries['SI']); unset($countries['HR']);}
if (ICL_LANGUAGE_CODE == 'sk') { unset($countries['CZ']); unset($countries['HU']); unset($countries['PL']); unset($countries['RO']); unset($countries['SI']);unset($countries['AT']); unset($countries['HR']);}
if (ICL_LANGUAGE_CODE == 'hu') { unset($countries['CZ']); unset($countries['SK']); unset($countries['PL']); unset($countries['RO']); unset($countries['SI']); unset($countries['AT']); unset($countries['HR']);}
if (ICL_LANGUAGE_CODE == 'en') { unset($countries['CZ']); unset($countries['SK']); unset($countries['PL']); unset($countries['HU']); }
if (ICL_LANGUAGE_CODE == 'pl') { unset($countries['CZ']); unset($countries['SK']); unset($countries['HU']); unset($countries['RO']); unset($countries['SI']); unset($countries['AT']);unset($countries['HR']);}
return $countries;
}

but how I can set when is slovak language it is correct to order from correct country?

January 8, 2025 at 3:09 pm #16574124

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Where does this filter hook coming from?

The code restricts the countries that can be selected during checkout based on the language of the website.

For each language (Czech, Slovak, Hungarian, English, and Polish), specific countries are "unset," meaning those countries cannot be selected for checkout.

This functionality can be useful in situations where you want to limit the countries available for purchase based on the language the user selects on the site (for example, only allowing certain countries to be available when users are shopping in certain languages).

Removing this filter will solve the issue?