This thread is resolved. Here is a description of the problem and solution.
Problem:
You are trying to cache translated posts but are unable to do so because of the _lsvary cookie, which affects caching behavior on your site.
Solution:
Currently, there is no update from the plugin authors regarding a solution to avoid the _lsvary cookie when caching translated posts. We previously reached out to the authors, and they are aware of the issue but have not provided a definitive solution yet.
We recommend contacting the plugin authors directly for the most recent updates on this issue.
The code below, provided by the client, eliminates the need to vary the cache based on currency. However, this approach is only suitable when a single currency is used per (sub)domain or URL. Please note that this code is untested and provided as-is, as it was not created by our team. We strongly recommend testing it thoroughly in a staging environment before implementation.
add_filter('litespeed_vary', 'unset_litespeed_wcml_vary_cookie', 99); function unset_litespeed_wcml_vary_cookie($vary_list){ if (isset($vary_list['wcml_currency'])){ unset($vary_list['wcml_currency']); } return $vary_list; }
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket at our support forum.
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 0 replies, has 2 voices.
Last updated by 1 day, 23 hours ago.
Assisted by: Marcel.