Currency switcher does not work with W3TC cache plugin
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from assadniang on December 10, 2021, 06:42Hello,
I just installed W3TC cache plugin
https://wordpress.org/plugins/w3-total-cache/
I have noticed that the currency switcher no longer works when the cache plugin is enabled.
When I switch currency, and navigate away from the homepage (click on a product), it goes back to the previous currency.
https://fab-and-glam.com/
I have contacted the cache plugin author and this is what he said:
Hello @assadniang
Thank you for the feedback.
I’ve checked this and yes you are correct. The reason for this is that the page is..Cached.
The reason why the CART is the only part of the page that is updated correctly is that woo commerce cart has something that is called cart-fragments.min.js
Basically, WooCommerce calls/?wc-ajax=get_refreshed_fragmentsin order to update the Cart items and Cart total asynchronously i.e. without the need of refreshing the website page you’re visiting.
In order to make the Cart update on every page of your website, WooCommerce runs this Ajax functionality every time.
This bypasses the cache and retains the functionality of the Cart.
Now the wishlist and currency do not have that option or at least not that I know of. So in order for those to work, it should the same as for the cart fragments.
Since ajax requests bypass the cache, they can also potentially slow down the website.
Now, W3 Total Cache’s main purpose is to improve website performance and that means to cache pages.
There are two ways to solve this. One and recommended is to check the Woocomerce settings and potentially reach out to their support and check if there is a possibility to load wishlist and currency with ajax.
The other is via W3 Total Cache and it’s called Page Fragment Caching. This allows you to manually wrap the specific PHP code with <–mfunc/–> comment which allows that part of the page to remain uncached.
The potential problem with this is that this does not work with the Disk: Enhanced caching method, so you need to switch to Disk: Basic or use Memory-based caching like Redis or Memcached.
You can check more details about Page Fragment Cache on our FAQ page.I hope this helps!
Thanks!https://wordpress.org/support/topic/wishlist-count-is-not-updated-when-w3tc-cache-is-enable/#post-15144401
Hello,
I just installed W3TC cache plugin
https://wordpress.org/plugins/w3-total-cache/
I have noticed that the currency switcher no longer works when the cache plugin is enabled.
When I switch currency, and navigate away from the homepage (click on a product), it goes back to the previous currency.
I have contacted the cache plugin author and this is what he said:
Hello @assadniang
Thank you for the feedback.
I’ve checked this and yes you are correct. The reason for this is that the page is..Cached.
The reason why the CART is the only part of the page that is updated correctly is that woo commerce cart has something that is called cart-fragments.min.js
Basically, WooCommerce calls/?wc-ajax=get_refreshed_fragmentsin order to update the Cart items and Cart total asynchronously i.e. without the need of refreshing the website page you’re visiting.
In order to make the Cart update on every page of your website, WooCommerce runs this Ajax functionality every time.
This bypasses the cache and retains the functionality of the Cart.
Now the wishlist and currency do not have that option or at least not that I know of. So in order for those to work, it should the same as for the cart fragments.
Since ajax requests bypass the cache, they can also potentially slow down the website.
Now, W3 Total Cache’s main purpose is to improve website performance and that means to cache pages.
There are two ways to solve this. One and recommended is to check the Woocomerce settings and potentially reach out to their support and check if there is a possibility to load wishlist and currency with ajax.
The other is via W3 Total Cache and it’s called Page Fragment Caching. This allows you to manually wrap the specific PHP code with <–mfunc/–> comment which allows that part of the page to remain uncached.
The potential problem with this is that this does not work with the Disk: Enhanced caching method, so you need to switch to Disk: Basic or use Memory-based caching like Redis or Memcached.
You can check more details about Page Fragment Cache on our FAQ page.I hope this helps!
Thanks!
Quote from Pablo Borysenco on December 10, 2021, 12:24Hello
Please watch a video - https://currency-switcher.com/video#video_1
Check options - https://share.pluginus.net/image/i20211210132217.png AND https://c2n.me/4ei9Alz.png
Hello
Please watch a video - https://currency-switcher.com/video#video_1
Check options - https://share.pluginus.net/image/i20211210132217.png AND https://c2n.me/4ei9Alz.png