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 3 months, 3 weeks ago.
Assisted by: Bobby.
| Author | Posts |
|---|---|
| October 8, 2025 at 10:00 am #17466657 | |
|
jiriP-10 |
Hi Bobby, because I am not sure, how much time it takes to you and your team, I am going to deactivate the Litespeed plugin now (I need to make some tests with other things). You can I activate it again whenever you need, it's absolutely no problem. Thank you for understanding and have a nice day! |
| October 8, 2025 at 6:44 pm #17468705 | |
|
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Hi there, No problem, can you please try the following steps: 1. Exclude cookies in LiteSpeed cache: wcml_client_currency and also set WCML to use cookies: add_filter( 'wcml_user_store_strategy', function() {
return 'cookie';
} );
Let me know your results, please. |
| October 9, 2025 at 12:18 am #17469233 | |
|
jiriP-10 |
Hi Bobby, with this snippet it works absolutely flawless, THANK YOU VERY MUCH, you helped me a lot and I really appreciate it. I am going to close the ticket, but I wanted to thank you. Have a nice day! |
| October 9, 2025 at 12:19 am #17469235 | |
|
jiriP-10 |
Perfect support, thank you! |
| October 9, 2025 at 3:25 pm #17472044 | |
|
jiriP-10 |
Hi Bobby, during today I made some more tests and I found out that it doesn't work completely right. I'll describe you what I found out. The difference is between two scenarios. 1. I clear the cache and then use VPN to simulate SVK location. I visit the website and there is no cache, so the first visit is with no cache and after that it creates the cache for visited pages - that's correctly - all pages are correctly with EUR currency - everything's fine. Then I close the browser, open the new one without VPN (so CZ location is applied). I visit the website, there is no cache for CZ location, so the first visit is with no cache and after that the cache is generated. All pages with CZK currency - everything's perfect. 2. The problem is here Then I close the browser, open the new one with VPN - SK location. And the first visit is from the cache with CZK currency. So it doesn't work as it should. I am not sure, where exactly is the problem and why the cookies aren't used when CZK cache is generated. Please, could you check it? Thank you in advance and have a nice day! |
| October 9, 2025 at 8:07 pm #17472921 | |
|
jiriP-10 |
Hi Bobby, I have some new info for you I just found out. When I visit the page from SK (EUR variant), there are set 4 cookies, the last one is important: But from CZ (CZK variant), there are set only 3 cookies: If I understand it well, the cookie _lscache_vary is important, because it's the cookie to mark different caches. That's why CZK currency can be shown after EUR (because there is this vary cookie), but when the CZK cache is created (without this vary cookie), it's considered as the main cache and it's served for all visitors. I am not sure how to proceed now. How to make WPML + LS Cache work. Please, can you help me? Thank you and have a nice day! |
| October 10, 2025 at 3:32 am #17473358 | |
|
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Hi there, At the moment I want to verify, is the code I provided still active in functions.php? You mentioned that at first it worked OK, did it work and then stop working? This will help us further investigate as i dont have access to the backend to further review. |
| October 10, 2025 at 10:06 am #17474059 | |
|
jiriP-10 |
Hi Bobby, thank you for the reply. Yes, the code is still active in functions.php It worked, or it was caused because maybe I've started from SK location (scenario 1) - I am not sure. When I tested it, I checked that 3 cookies are set for both currencies, but I didn't know, that there should be also ls vary cookie, so I didn't check it. Only when I've noticed that it doesn't work, I've started to looking for why and I've found out what I've written before. Thank you in advance and have a nice day! |
| October 10, 2025 at 10:09 am #17474061 | |
|
jiriP-10 |
And also I can give you access to the admin and FTP again. Probably it deleted you this info, because I closed the ticket. So I can fill it again. Thank you! |
| October 10, 2025 at 8:59 pm #17475716 | |
|
jiriP-10 |
Hi Bobby, I tested to add some code to the functions.php and enable Cache REST API. After that it started to work. But I was debugging another problem, so I disabled Cache REST API and removed the code = original status (only with code from you). And it still works... I will test it during the weekend and I'll let you know if there will be any problem, or if it works. I don't understand what happened, but for now it works and you don't have to check it. Thank you and have a nice weekend! |
| October 13, 2025 at 10:50 pm #17481577 | |
|
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Thank you for updating me, and looking forward to hear back if it is resolved or the issue returned. Hope you had a great weekend. |
| October 16, 2025 at 12:59 am #17488593 | |
|
jiriP-10 |
Hi Bobby, I am sorry for the delay, I was testing it. It seems that my code somehow made it work and it works even after several days, so I am closing the ticket. Thank you for your help and cooperation. Have a nice day! |
| October 16, 2025 at 1:00 am #17488594 | |
|
jiriP-10 |
Thank you! |