Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are experiencing issues with WooCommerce Multilingual & Multicurrency due to an active cache plugin on your site, which may cause currency display issues. You need to create a cookie exception in your Nginx server configuration to prevent caching for visitors with a specific cookie.
Solution:
We recommend contacting the support team for your cache plugin or your hosting provider for assistance with adjusting your Nginx configuration. Here is a basic example of what the configuration might look like:

nginx
server {
    listen 80;
    server_name yoursite.com;
 
    location / {
        if ($http_cookie ~* "cookie_name_here") {
            set $skip_cache 1;
        }
 
        # Your existing caching settings
    }
}

Please replace "cookie_name_here" with the actual name of the cookie. This is just a general guide, and your specific setup may require different settings.

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 further assistance is needed, please open a new support ticket at WPML 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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Shekhar Bhandari 7 months, 3 weeks ago.

Assisted by: Shekhar Bhandari.

Author Posts
May 10, 2024 at 12:18 am #15612394

khalidA-55

Instead, I got:

WooCommerce Multilingual & Multicurrency detected an active cache plugin on your site. Caching may cause currency display issues for your customers if you are using the multicurrency feature. To avoid this, set your cache plugin to not cache pages for visitors that have a cookie set in their browser.
actually i need to how to create the cookies exception for a site hosted on Nginx.

May 10, 2024 at 5:33 am #15612586

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thank you for your message. We’ve noticed that you are using a caching plugin with WooCommerce Multilingual & Multicurrency on your site. This can sometimes cause problems with how different currencies are displayed to your customers. To fix this, you need to adjust your cache plugin so that it doesn’t store pages for visitors who have a specific cookie set in their browser.

Unfortunately, WPML support can't help with setting up your caching or server settings, like those for Nginx. This is because these settings can be quite different depending on your setup.

I recommend you talk to the support team for your cache plugin or your website hosting provider. They can guide you on how to make sure pages aren't cached for certain visitors. For example, if you are using Nginx, you might need to change your server settings to ignore cache if a certain cookie is detected. Here's a basic idea of what that might look like in Nginx:

nginx
server {
    listen 80;
    server_name yoursite.com;

    location / {
        if ($http_cookie ~* "cookie_name_here") {
            set $skip_cache 1;
        }

        # Your existing caching settings
    }
}

This is just an example. Your actual setup might need something a bit different. The support team for your cache plugin or your hosting provider can give you the specific steps you need based on how your site is set up.

Best regards