-
AuthorPosts
-
May 3, 2021 at 2:14 pm #92242

Andreas HParticipantI’m trying to build a custom switch between two currencies (USD and EUR). USD is the default currency.
I’ve built the custom switch as a toggle switch which on toggle will set the value of Cookie: wmc_current_currency
So for example, switching to EUR will make the value of wmc_current_currency = EUR. Then refresh the page.
This however does not work. It sets the cookie and I can see the value becomes EUR. But the page does not reflect that.
If I visit ?wmc-currency=EUR, then it works.
I want to avoid using the query string as it takes a lot longer to load the page and I want to avoid showing a query string to my visitors.
As mentioned in https://codecanyon.net/item/woocommerce-multi-currency/20948446/comments?page=29&filter=all#comment_26578310, the issue is related to my site using caching.
I’m using W3 Total Cache and when I deactive the plugin, the switch works. So it is definitely a correct assumption.
Question though, is there any way of working around the cache issue? -
AuthorPosts
You must be logged in to see replies to this topic. Click here to login or register