Skip to content Skip to sidebar

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 25 replies, has 0 voices.

Last updated by jiriP-10 1 month, 3 weeks ago.

Assisted by: Bobby.

Author Posts
September 26, 2025 at 2:48 pm #17436477

jiriP-10

Background of the issue:
I am trying to use the WPML plugin, but I have found that cookies related to country, currency, and language aren't being set as expected. I deactivated all plugins except WooCommerce and WPML, and switched to the default Twenty-Twenty-Five theme, but the issue persists. I suspect the problem might be related to a new staging site created by copying the production site.

Also I am not able to update WPML plugins even in the Commercial tab. It shows me, that they are up to date, but they aren't - as you can see in the attached printscreen.

Symptoms:
Cookies from WPML (country, currency, language) aren't set, even though they should be. I expected the cookies to be set on the first visit and then stored, but they aren't.

Questions:
Why aren't the WPML cookies being set?
How can I fix the issue with cookies not being set on the staging site?

September 26, 2025 at 10:23 pm #17437368

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Please go to https://wpml.org/account/downloads/ , download the latest versions and update the plugins manually.

Once that is done, test the cookies one more time as it will help us to know that we are testing using the latest versions of WPML.

Also, share with me the way you are testing and validating that certain cookies are not being set so I can better assist.

September 27, 2025 at 8:37 am #17437694

jiriP-10

Hi,

thank you for the reply.

As I wrote to your AI, at the end I was able to update it from the dashboard, but unfortunately it doesn't solve the problem with cookies.

How I am testing it:
Anonymous mode → F12 → Network → visit page → Response headers
On the live site (where it works as expected) when I visit the first page WPML cookies are set and when I reload page / visit another page, the cookies are stored
On the staging site the cookies aren't set, so they can't be stored

You can see that in the attached printscreen and you can try it by yourself - live site - hidden link and staging site - dev.elegantisimo.cz

Can you help me, please?

Thank you in advance and have a nice day!

Best regards
Jiří Pázler

wpml-cookies.png
September 29, 2025 at 8:20 pm #17442260

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for sharing the above screenshots!

If possible, please review the wp-config.php of your live VS the staging site.

Do you notice any differences between them in regards to cookies?

Also, can you send me a copy of your wp-config.php (from staging) file but remove the sensitive data like salts and DB data?

Please leave the rest as it is and if you want you can check for

define('COOKIEPATH', '/');

or at least for the "COOKIEPATH" value.

Please let me know what your value is.

September 29, 2025 at 9:01 pm #17442289

jiriP-10

Hi,

thank you for the reply.

Except differences in db there are no other differences.
Cookiepath isn't there, so it should be ok.

I am sending you the wp-config - there are changed everything about db and salt to XXX, but nothing is deleted. I can't upload the php file, so I made a screenshot - I hope it's fine - there are just usuall things I think.

I can create you credentials to the staging and also create FTP access to staging (or global - so you can compare the live site and staging), so you can check it by yourself. Just let me know.

Thank you in advance and have a nice day!

Best regards
Jiří Pázler

wp-config.png
September 29, 2025 at 9:07 pm #17442305

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Anything else that would be different between live and staging? At the moment I am not able to reproduce this behavior on a sandbox either, which points to a possible environment related issue.

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

October 1, 2025 at 1:10 am #17446916

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Apart from the cookies issue we are reviewing please note the following that I noticed on the environment:

1. Language was set to private.

2. No language switcher was displayed.

3. Multiple settings under WPML → Settings were altered, which can cause issues.

Warnings detected:

Warning 1: The product_type field was incorrectly set for some product translations because the product_type taxonomy was translated. Fix this via the WPML Multilingual & Multicurrency for WooCommerce troubleshooting page.

Warning 2: Some taxonomies are forced as untranslatable, breaking multilingual WooCommerce. Likely caused by a plugin or theme.

Adjustments made:

WPML → Settings → Post Types Translation had pages/posts set to Not translatable. I updated pages to Translatable (currently 0 translations).

Duplicated the homepage as a test translation.

Added the language switcher to the footer.

Also, when it comes to cookies WPML will only store cookies that are needed, for example we have a cookie when the Ajax action is enabled, I have enabled this feature and can confirm the cookie was set OK.

https://wpml.org/documentation/support/browser-cookies-stored-wpml/

Screenshot 2025-09-30 at 6.10.17 PM.png
Screenshot 2025-09-30 at 6.06.45 PM.png
Screenshot 2025-09-30 at 6.06.22 PM.png
October 1, 2025 at 6:16 pm #17449956

jiriP-10

Hi Bobby,

thank you for the answer and explanation.

I made some tests and found out where is the „difference“ between live site and staging site and it is WP Rocket cache plugin.

With WP Rocket your plugin set cookies
wcml_client_currency
wcml_client_currency_language
wcml_client_country
in the first visit and then store them.

wcml_client_country is set according to location (because of geolocation settings).

wcml_client_currency is set according to geolocation and settings in your WPML currency plugin.

wcml_client_currency_language is set by deffault to „cs“, because on the live site the „sk“ language is hidden (as it was on the staging site) - I never understand, why this cookie is used, when there is only one language, but WP Rocket creates cache with this cookie automatically so I accepted it.

I thought, that this behaviour is deffault for your plugin, but as I can see, I was wrong.

So I'd like to ask you, how can I make work WPML with LiteSpeed cache with currencies I use? On your site is a post, that WPML and LS cache are compatible and there is no need any settings. I tried it, but it doesn't work (when there is a created for CZK currency and I visit the page from SK, the CZK page from cache is served). That's the reason, why I started to looking for the problem and I thought, that the problem is, that cookies aren't set and stored.

When the cookies aren't set and stored, how the LS Cache knows, which currency to use?

Please, how can I make your plugin work with WPML as you are saying in your post → https://wpml.org/plugin/litespeed-cache/ ?

Kindly thank you in advance and have a nice day!

Best regards
Jiří Pázler

October 2, 2025 at 9:49 pm #17453111

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Please elaborate on this "when there is a created for CZK currency and I visit the page from SK, the CZK page from cache is served"

it sounds like the issue you are experiencing is beyond the cookies and how WPML sets them.

Are there specific steps I can follow to reproduce what you are experiencing ?

October 2, 2025 at 11:03 pm #17453156

jiriP-10

Hi Bobby,

thank you for the reply and I am sorry if I describe it badly. I'll write it step by step and I also mention what is the problem according to me and how it should work by my opinion.

Without the cache (or with WP Rocket with these 3 cookies we are talkin) it works correctly. You visit any page of the website and it shows you currency by your country (in my case CZK for Czech republic and EUR for Slovakia republic - and probably for all other countries using EUR too). That's great and I think that's exactly how it should work.

With Litespeed cache
I visit any page of the website from the Czech republic (in this time there is no cached content) and it shows me correctly CZK currency and also it creates cache (so when I visit it next time, it serves me the page from the cache). This works correctly, when I visit the page from Czech republic. But the problem is, when I visit this page (page, which already have the cache for CZK) from Slovakian republic. It shows me the page from the cache with wrong currency (CZK currency).

By my opinion it should show me the uncached version of the page (because the cache, which exists contains the wrong currency).

Another thing I've noticed.
There is a page, which already has the cached content for CZK currency. I visit it from Slovakia and it shows me the wrong currency (as I described above), but after that I visit another page, which has no cached content yet and it switches to the correct currency (in this case to EUR) and then when I visit the first page again (the one, which has only CZK currency cached content) it doesn't show me the CZK currency again, but it shows me uncached page with the correct currency (EUR).

I am not so familiar with cookies, but according these things I think, that there is problem with setting cookies.
When I visit a page with no cache - it shows me the correct currency (according to cookies I guess).
But when I visit the page with already cached content, it shows me the cached page (no matter of my location - CZ/SK). I guess, that there is no setting cookies for cached content.

And I think that's the problem I described above. 1 page has CZK cached content → I visit it from SK, but cookies aren't set and the cached content is served → after that I visit a page with no cache and cookies are set (and stored) → so when I visit the first page again, it doesn't serve me the cached content (because my cookies are different) and it shows me uncached page and creates the cache with EUR currency.

According to what I know - the first visit shouldn't be never served from the cache - because cookies have to be set and when they are set and stored, the cache plugin can serve the cached content (because it know which one - according to cookies).

I tried to also set Vary group in Litespeed cache plugin (because it should be used for that), but it didn't work. And maybe it's because of that, that cookies aren't set.

I am sorry for my English and I hope you'll understand what I mean and where is the problem.

Please, can you help me and check where is the problem? Or can you tell me, what I have to do to set Litespeed cache properly?

Thank you in advance and have a nice day!

Best regards
Jiří Pázler

October 2, 2025 at 11:27 pm #17453160

jiriP-10

For testing with different location you can use free Google Chrome addon - 1ClickVPN Proxy for Chrome - there are Czechia and Slovakia, so you can use exactly the same location we talk about.

October 6, 2025 at 8:47 pm #17462011

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

I am testing this now.Is litespeed currently activated?

1. Use VPN to switch to CZ location

2. Visit hidden link and the currency is showing in CZ

3. Change location to Germany

4. Reload the page and the currency automatically switched to EUR

October 6, 2025 at 8:52 pm #17462016

jiriP-10

Hi,

no, Litespeed wasn't activated - I wasn't sure when you'll check it and during the weekend I made some other tests.

I activated litespeed now, so you can try it again.

Thank you!

October 8, 2025 at 12:16 am #17465592

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you, I can see the issue now with Litespeed activated.

Please review the following thread and feedback from the plugin author.

https://wordpress.org/support/topic/litespeed-wcml-currency-switch-issues/

In the meantime I will also further discuss this with our team and update

October 8, 2025 at 9:46 am #17466589

jiriP-10

Hi Bobby,

thank you for the reply.

It's basically the problem, but in my case I want to create different caches (varies) according to currency. In my case it means only 2 different caches, so it shouldn't be a problem.

I'll be waiting for more details from you and your team.

Thank you and have a nice day!