Using multiple currency plugins with WP Rocket

In this article, you will learn how to use multiple currency plugins along with WP Rocket. There is a brief introduction, a list of compatible plugins, and other useful information.

Overview

In order for currency switching to be compatible with page caching, it must rely on either AJAX (JavaScript) or set a cookie (that can be used either to exclude the page(s) from caching, or to programmatically create different cache files based on the value of that cookie).

That’s because WP Rocket eliminates all PHP/MySQL processes from a page and creates static HTML output instead (as do most other caching plugins).

Compatible plugins

WP Rocket has built-in compatibility for these plugins:

Each of these plugins uses a cookie to store the currency, which allows WP Rocket to create different cache files based on the value of that cookie. We recommend you choose one of these plugins for your site to ensure that currency switching can work properly.

Recommendation for CURCY

If you opt for using CURCY, you will need to make sure the "Use SESSION" option on their General settings is deactivated.

Cache is not delivered in the first visit

Keep in mind that when you use any of these plugins, the first visit won’t get the cached page because:

Other plugins and custom implementation

If you are using a different plugin from this list, and if it's using cookies to manage the currencies, you could make your own custom implementation by following this guide:

Create different cache files with dynamic and mandatory cookies

Wrong currency in the cart

If you are using a menu cart and the currency displayed on it is not working as expected, please try the following solutions:

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.