Skip navigation

Open

Topic Tags: Compatibility

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

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

Option 1

  • Go to Settings > WP Rocket page.
  • Then in Advanced rules > Never Cache Cookies section, add this cookie:
    wcml_client_currency

Option 2

  • Add the following code into your theme’s functions.php file:
    /*
    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' );
    

комментария 2 на “WP Rocket - Currency Not Changing in Products Page”

  1. WP Rocket: You are using «Dynamic Cookies Cache». Cloudflare APO is not yet compatible with that feature.
    You should either disable Cloudflare APO or check with the theme/plugin requiring the use of “Dynamic Cookies Cache” developers for an alternative way to be page-cache friendly. More info

    https://docs.wp-rocket.me/article/1444-using-cloudflare-apo-with-wp-rocket?utm_source=wp_plugin&utm_medium=wp_rocket

    i get this notification when adding this settings you provided, can you guys please fix your plugin!

Написать ответ

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

Вы можете использовать эти метки:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>