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
10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 - -
16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 - -

Supporter timezone: Asia/Jerusalem (GMT+03:00)

This topic contains 21 replies, has 0 voices.

Last updated by Itamar 12 hours, 51 minutes ago.

Assisted by: Itamar.

Author Posts
June 11, 2025 at 11:26 am #17125378

jiriP-10

Background of the issue:
I am experiencing a compatibility issue between WPML currency and WP Rocket, specifically with the preloading function for different currencies. I use two currencies (CZK for CZ location and EUR for SK location) and one language (cs), set according to cookies from WPML. The issue arises when preloading pages according to these cookies.

Symptoms:
The cache for the EUR currency is not working correctly. WP Rocket creates a cache with the EUR currency, but WCML is not reading it on time, resulting in the default CZK currency being saved in WP Rocket as the cache file for the EUR currency.

Questions:
Can you help me resolve the compatibility issue between WPML currency and WP Rocket?
Why is WCML not reading the EUR currency on time, causing the wrong cache to be saved?

June 11, 2025 at 5:04 pm #17127423

jiriP-10

Hello,

all plugins are updated and the problem is still there.

I shouldn't follow suggestions from #4, because there is only some hidden link about WP Rocket, but nothing what I could do. But I don't think that it's the same problem, because there was problem only on the home page. I have different problem - the cache is created, but it's not created with EUR currency but with CZK currency, because the helper plugin (used for preloading according to cookies) is technically sending the right request, with the right EUR value for the right cookie, but WCML is not "reading it on time". WCML responds with the default CZK currency. And, this is what's wrongly saved in WP Rocket as the cache file for the EUR currency.

Can you help me with that?

Thank you.

Best regards
Jiří Pázler

June 15, 2025 at 8:15 pm #17136814

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Jiří.

I'll continue to help you with this issue.

Can you please explain to me how to see this problem on your site?
Please add screenshots.

Without getting too deep into your case yet, my current assumption is that the problem happens because the SK language is hidden on your site.

Regards,
Itamar.

June 18, 2025 at 12:56 pm #17146527

jiriP-10

Hi Itamar,

thank you for the reply and I am sorry for the late reply, I missed the notification.

The problem isn't connected with the language. The problem is, that the preloading helper plugin can't use right cookies to preload. The problem with EUR currency I solved, but now I face another problem, so for better understanding I'll describe it bellow.

EUR problem was caused, because EUR currency wasn't allowed for Czech republic (the main country and also the country where the server is located). So when it tried to preload EUR currency, it wasn't able, because the EUR currency wasn't allowed for Czech republic. This problem I solved by allowing EUR currency for all countries. So now I have pages preloaded with EUR currency, but with wrong price - it's because different VAT rates. In Czech republic we use 21 % VAT rate and Slovakia uses VAT rate 23 %. So now the problem is, that prices are preloaded with main VAT rate (VAT rate used in main/deffault country - in my case Czech republic).

I am not sure, if the problem is caused by the main country or if it cause by location of server, but the preloading services can't uses the right cookies to preload.

I hope that you understand what I mean and where is the problem.

I can send you screenshots, but it will be only two same pages with different prices, so I am not sure, if it helps you.

Thank you in advance and have a nice day!

Best regards
Jiří Pázler

June 19, 2025 at 11:49 am #17150404

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Jiri.

To be honest, I'm confused and unsure about what the problem is and how I can see it. It would be great if you could share a video with me explaining (preferably in your voice) the problem. You can use the free online screencast service Komodo - hidden link. This should help me identify if there's anything wrong.

You wrote: "I am not sure, if the problem is caused by the main country or if it cause by location of server, but the preloading services can't uses the right cookies to preload."

WPML is a multilingual plugin. It's about languages, not about countries. Indeed, the WooCommerce Multilingual & Multicurrency plugin has an option to show the currency according to the client's location, but it relies on the MaxMind service. We mention the following in the multicurrency settings when you activate the Client Location feature in the multicurrency settings (WooCommerce -> WooCommerce Multilingual & Multicurrency -> Multicurrency).

WooCommerce integrates with MaxMind Geolocation to reliably determine the location of your customers. Learn how to generate a free license key

MaxMind is a third-party service provided through WooCommerce.
Have you enabled the MaxMind service?
Where are you checking this issue from?
Are you in the Czech Republic or elsewhere?
What are the peeloading services you mentioned?

I can also review your site to identify any potential misconfigurations with WPML and WooCommerce Multilingual & Multicurrency. If you agree, please explain where I can view the different VAT rates.

If you need further help with this, please share the access details to your site with me. I'm enabling a private message for the following reply.
Privacy and Security Policy
We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/
**IMPORTANT**
- - Please backup the site files and database before providing us access. --
-- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.--

Please note that my weekend is Friday-Saturday, and I'll be able to continue to check this issue and help you on Sunday.

Regards,
Itamar.

June 23, 2025 at 12:57 pm #17160389

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Thanks for your detailed explanation.

I'm consulting with second-tier supporters to determine if we can assist you with this case. I want to set expectations and inform you that your issue may be outside the scope of our support forum and would require custom work. But let's wait to hear what our second-tier supporters have to say about it.

I appreciate your patience.
Itamar.

June 23, 2025 at 3:50 pm #17161486

jiriP-10

Hi Itamar,

thank you for update, I'll be waiting for more details.

Thank you and have a nice day!

Best regards
Jiří Pázler

June 25, 2025 at 8:09 pm #17170838

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Jiri.

Our second-tier supporter is asking the following:
"I wonder from the video - if the tax rate applied is the 21% rate for the CZ?"

Regards,
Itamar.

June 25, 2025 at 8:22 pm #17170861

jiriP-10

Hi Itamar,

yes, VAT rate for Czech republic is 21 % and for Slovakia 23 %.

But if I preload pages to Slovakia (cookie country=SK), there is also applied 21 % and that's the problem. Without the cache (specifically if pages aren't preloaded) it works correctly.

Thank you!

Best egards
Jiří Pázler

June 26, 2025 at 11:21 am #17173047

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Jiří.

Our second-tier supporter suggested replicating this issue on a fresh WordPress installation. Then I'll be able to escalate it to our compatibility team. To achieve this, I created a test website with a clean WordPress installation. You can access it through this link:

hidden link

With this link, you'll be directly logged in.

I already configured WPML on this site to have Czech as the default language and Slovak as the second language. WooCommerce and WP Rocket are installed on this site.

Could you please install the WP Rocket | Preload dynamic cookie values plugin and see if the issue is replicable on a clean WordPress installation?

Please configure WPML and WooCommerce as they are set on your site (only the basic configurations required to replicate the issue are necessary).

Please also make sure that you are installing the latest version of the plugin.

When everything is finished and you can replicate the problem, please let us know.

Important! Do not import your site to the test site. We must replicate the problem on a fresh, clean WordPress installation.

I want to set expectations. The WP Rocket plugin is officially compatible with WPML: https://wpml.org/plugin/wp-rocket/. However, the WP Rocket | Preload dynamic cookie values plugin is unknown to us. We will do our best to help with this issue, but if we are unsuccessful, cooperation from WP Rocket will be necessary.

Regards,
Itamar.

June 26, 2025 at 3:25 pm #17174449

jiriP-10

Hi Itamar,

thank you for the reply.

I set the demo site as I could. Here are steps which I did:
1. Activated WooCommerce and set General options for WC
1.1. Set location to Czech republic
1.2. Set locations to sell to Czech republic and Slovakia
1.3. Set deffault location of customer to geolocation (and add MaxMin d geolocation key)
1.4. Allow tax
1.5. Set deffault currency to CZK.
2. I set WooCommerce tax settings
2.1. I enabled adding prices including tax
2.2. I set Count tax according to billing address of customer
2.3. I set showing prices including tax
2.4. I set VAT rates for CZ and SK (CZ 21 % and SK 23 %)
3. I hide sk language (as it is on my site)
4. I activated WooCommerce multilingual and multicurrency
4.1. Set show currencies according to location and add Maxmind key
4.2. Create EUR currency, set exchange rate and allow it for all countries
5. I created a product with price in CZK and EUR currency
6. I set site visibility to Live (without that I shouldn't check if everything works correctly - using geolocation etc. for currency and VAT rates was rewritten by settings of country in my account (I hope that you understand what I mean)
7. Install WP Rocket preload dynamic cookies plugin and here I have a problem - the settings of this plugin isn't available from WP dashboard but it's made inside of the plugin by changing php file. I tried to zip the plugin I use on my staging site, but from some reason I couldn't upload it to the sandbox (there was an error). So I'd like to ask you, if you can provide me credentials to FTP or if you can upload the file to sandbox. It should be placed to .../wp-content/plugins/wp-rocket-preload-dynamic-cookies and it should rewrite the original file. Here I have no possibility to add php file, so you can download it here - hidden link

Then it should be everything. You can clear the cache in WP Rocket and let it preload it. If everything works correctly, you should see in .../wp-content/cache/wp-rocket/harmonious-cajon.sandbox.otgs.work/produkt/test-product files:
index-https-CZK-cs-CZ.html
index-mobile-https-CZK-cs-CZ.html
index-https-EUR-cs-SK.html
index-mobile-https-EUR-cs-SK.html

These files have to be generated. When they are generated, then you can check, if it works as it should. The product with SK VAT rates should costs 37,20 €.

Now I'd like to write a few words about this plugin, when you don't know it. WP Rocket is able to preload pages automatically, if there is nothing like WPML or settings of geolocation etc. If I use geolocation, the content is dynamically changed according to location (like VAT rates in my case - the product has different prices in Czech republic and in Slovakia - because of different VAT rates). If I use WPML (for now I use only WPML currency, languages I'll add in the future I guess - it's kinda complicated to set) there is also different currencies - CZK for CZ and EUR for SK. So by deffault the WP Rocket generates only global cache which will be used by nobody - because there are cookies which were created by WPML and WP Rocket starts to generate new cache according to these cookies. So when I want to preload pages, I have to use something for preloading the content with cookies from WPML (in my case cookies for country, currency and language). And that's why this helper plugin (WP Rocket preload dynamic cookies) was created. In the plugin I set which cookies and which values (like CZK and EUR for currency) should be preloaded and the plugin handles that. If you want, you can see more information about this plugin here - hidden link

But the problem is, that the plugin isn't able to preload content for which it haven't access (for example - if I disable EUR currency for Czech republic in WPML currency plugin, the preloaded content will be with CZK currency and the same problem I have with different VAT rates).

If you can give me FTP access I can check how it works by myself, but without that I am not able to see, if the cache was preloaded for both currencies or not. If I visit the page when it's not preloaded (or when I bipass the cache, it works correctly).

I hope that everything is clear, if not, please, let me know.

Thank you in advance and have a nice day!

Best regards
Jiří Pázler

June 26, 2025 at 8:02 pm #17175158

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Jiří.

Thanks for replicating the issue on the sandbox site and providing detailed explanations.

We don't have FTP access for those sandbox sites. You can use the Filester - WordPress File Manager Pro plugin, which is installed on this site, to upload your plugin.

Disclaimer. Since you mentioned that the plugin's settings are manipulated by modifying the PHP code, this issue may fall under custom work, which is outside the scope of our support forum.

Please let me know if you were able to install your customized wp-rocket-preload-dynamic-cookie plugin, and indicate where in its files you made the customizations. I'll then consult our second-tier supporters about this case.

Please note that my weekend is Friday to Saturday, and I'll be able to continue checking this issue and helping you on Sunday.

Regards,
Itamar.

June 27, 2025 at 12:02 am #17175418

jiriP-10

Hi Itamar,

thank you for the reply.

Well I tried to use Filemanager, but probably I am not sure how to use it correctly, because in the plugin folder I see only 3 plugins (and on the site is installed more than 3) and the one I need I can't see there - you can see that in the attached printscreen.

So could you please, upload the provided file there by yourself?

Changes in the plugin were made by WP Rocket support - basically they rewrote the settings, because by deffault there are only examples how to use plugin (where to write cookie name, where to write value of the cookie etc.). It's plugin for dynamic cookies not only for WPML, so there have to be set name of cookie - in my case (WPML case) it is - wcml_client_currency, wcml_client_currency_language and wcml_client_country - and their values.

Thank you in advance!

Best regards
Jiří Pázler

Filester-‹-Sandbox-—-WordPress.png
June 29, 2025 at 8:06 pm #17180857

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Jiří

It works with the WP File Manager plugin. Please see the attached screenshot. However, I'm consulting our second-tier supporter about this case. I need to get his judgment on whether we can support this case.

I appreciate your patience.
Itamar.

2025-06-29_22-54-23.jpg
June 30, 2025 at 11:14 am #17183533

jiriP-10

Hi Itamar,

thank you for the reply.

I was able to rewrite the file, so now the settings of the helper plugin is correctly. But I am not able to force the WP Rocket to preload the site. I also installed Rank Math (the same plugin I use on my site) to create sitemap, which WP Rocket uses, but it didn't help. If I visit pages manually it creates the cache, but for reproducing this problem I need to preload the cache automatically.

So for now I am not able to reproduce the problem in the sandbox and I am waiting for more information from tier 2. This problem basically affects all shops, which use different taxes and WPML + WP Rocket with preloading function. Because now it's not possible to preload the cache corretly.

Best regards
Jiří Pázler