This issue depends on the caching system itself, which prevents the Currency Switcher from performing the currency conversion. Caching systems, such as WordPress plugins or reverse proxies (Varnish, Squid, etc), work by saving static copies of pages, which are then served when a new request arrives, without loading the whole WordPress/WooCommerce framework. Such mechanism can work well for sites whose content changes rarely, but it's not suitable for highly dynamic sites, such as the ones powered by the Currency Switcher, because they will often serve stale pages, containing incorrect currencies, rather than the fresh, dynamically generated ones.


The following is the flow when a caching system is enabled:

  1. A new (not cached) page is requested. Let's suppose that the active currency is USD.
  2. The Currency Switcher processes the products before the page is rendered, using the active currency (USD).
  3. The caching system saves a static copy of the prepared page (in USD) and serves it.
  4. At every subsequent request of the same page, regardless of the selected currency, the caching system serves the static copy of the page, with prices in USD. The page rendering process, during which the conversion takes place, is skipped completely; the Currency Switcher is not even loaded. In such case, no detection or conversion can take place.
  5. The page is served in USD, regardless of the selected currency, until the caching system decides that it's too old. It will then discard it, causing a new page to be generated with the active currency (let's suppose EUR).
  6. The page will now always be served in EUR, with the Currency Switcher being ignored, until the cache expires. The cycle will repeat indefinitely.

How to ensure that the correct content is served
Since the issue is caused by caching, it has to be solved on the caching system itself. The solution depends on which caching system you use. Some caching systems can handle dynamic caching, and can serve different content depending on the selected currency (and other parameters), while others are too rigid and must be disabled on catalogue pages.

To learn how to implement dynamic caching on your site, please refer to the related knowledge base article: How to add dynamic caching to your site. If the caching system you use does not support dynamic caching, then you will have to disable caching on catalogue pages, or use an alternative system.


Further reading


You can purchase the Currency Switcher from our online shop.