WPML

Overview of the Issue

If you are using WP Rocket plugin, you may notice that currency changes on product pages are not being reflected immediately. Instead, the currency only updates after refreshing the page.

Workaround

This issue is fixed. Updating to the latest version solves it on your site, so you only need this workaround if you can’t update yet.

Please, make sure of having a full site backup of your site before proceeding.

Option 1

  • Go to SettingsWP Rocket page.
  • Then in Advanced rulesNever Cache Cookies section, add this cookie: wcml_client_currency

Option 2

  • Add the following code into your theme’s functions.php file:
    PHP
    /*
    compsupp-7372
    This filter adds ?wcmlc={currency_code} to the URL, which specifies a query string with the currency code.
    */
    add_filter( 'wcml_is_cache_enabled_for_switching_currency', '__return_true' );

All known issues

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.