• Resolved CaptainMorgan

    (@davehealey)


    Hi,

    WooPayments multi-currency selector doesn’t work with page caching plugins. I’ve tried all of these:

    Super Page Cache
    Breeze
    Wp Fastest Cache
    W3 Total Cache
    WP-Optimize
    WP Super Cache

    It does work with litespeed cache, after I reported it to them and they did some magic, but I’m no longer using a litespeed server and their page caching only works with litespeed servers.

    I see a couple of other reports about this issue, I’ve also reported to the Woo support team, but they’ve not been able to provide a solution.

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Support Moses M. (woo-hc)

    (@mosesmedh)

    Hi @davehealey,

    Based on the issue described, it appears to be related to the caching plugin, but there’s a workaround. Many caching plugins allow you to exclude specific pages or elements from being cached. Try excluding the pages with the currency selector (such as the checkout or product pages) from the cache to prevent interference with the multi-currency selector.

    Thread Starter CaptainMorgan

    (@davehealey)

    Thanks for getting back to me.

    This is what WooCommerce support suggested also. As I explained to them, the currency is shown on every page (mini cart in the header, I’m using the Storefront theme) so I can’t just exclude a page or two. Since WooPayments tracks the currency via a cookie I have to exclude the cookie, and all the page caching plugins I’ve tried will disable page caching for pages that has an excluded cookie – so in this case they essentially disable page caching entirely.

    I am not aware of a page caching plugin that will allow me to exclude specific elements on a page – can you tell me of one?

    WooCommerce support suggested some kind of dynamic caching and sent me a link to this page – https://github.com/Automattic/wp-super-cache/wiki/How-do-I-not-cache-part-of-my-page%3F – which as you will see from the first paragraph is information for plugin developers and not much use to me.

    Have you tested the multi-currency selector with any page caching plugins and found it to work?

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello CaptainMorgan,

    Thank you for your reply.

    You mentioned “WooCommerce support suggested“, did you submit a ticket at WooCommerce.com?
    Or are you referring to another thread on this forum? I want to confirm which guidelines were previously suggested to you so we do not repeat them.

    You are right, the dynamic caching suggested via the GitHub link requires coding knowledge.
    If you want to follow that suggestion, I recommend consulting a professional developer.
    You can find a good developer at Codeable.io or WooExperts.

    Looking forward to your response. ??

    Thread Starter CaptainMorgan

    (@davehealey)

    Hi,

    Yes I opened a ticket with WooCommerce.com. The dynamic caching would have to be part of the WooPayments plugin, no?

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thank you for confirming.

    I understand your concern. Please note that WooPayments relies on cookies to track the selected currency, which can create challenges with traditional page caching systems. These systems often treat pages with such cookies as non-cacheable, potentially impacting caching across your site.

    To address this issue, you would need a caching plugin that allows excluding specific parts of the page (e.g., the currency selector) from being cached. Alternatively, implementing custom code to enable dynamic caching is another solution. As my colleague mentioned in the previous response, you might need to hire a developer for this task.

    Thread Starter CaptainMorgan

    (@davehealey)

    Hi,

    Can you tell me of any page caching plugin that allows me to exclude the parts of WooPayments multi-currency?

    For the custom code you have both mentioned, this would need to be part of the WooPayments plugin, right?

    Plugin Support Mahfuzur Rahman(woo-hc)

    (@mahfuzurwp)

    Hi @davehealey ,

    Regarding dynamic caching, it doesn’t necessarily have to be implemented within the WooPayments plugin itself. Some caching plugins support fragment caching or AJAX-based exclusions, which allow dynamic elements (like the currency selector) to be excluded from caching while keeping the rest of the page cached.

    For custom code, a developer could implement a solution where the multi-currency selector loads dynamically via JavaScript, ensuring it updates correctly without interfering with page caching. This approach would not require modifying WooPayments directly.

    As for caching plugins that allow excluding specific parts of a page, I don’t have a tested recommendation, but you might want to check if WP Rocket or other advanced caching plugins offer such functionality.

    Thank you.

    Thread Starter CaptainMorgan

    (@davehealey)

    WP Rocket states in their documentation that they don’t support fragment caching. They also list the multi-currency plugins they support – WooPayments isn’t in the list. They also say

    > 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).

    So it looks like the solution suggested in the github issue, separate cache files for each currency is the only practical solution.

    The people behind the Breeze cache plugin attempted an ajax based solution when I reported the issue to them. There were two problems though, it was really slow to update the currency between pages and of course it completely fails for any users who have Javascript disabled (not many, but they exist).

    Plugin Support Mahfuzur Rahman(woo-hc)

    (@mahfuzurwp)

    Hi @davehealey,

    It sounds like you’ve done thorough research and testing—thank you for sharing your findings!

    From what you’ve described, separate cache files per currency seem to be the most practical approach. Since WooPayments currently tracks currency via cookies, caching solutions that rely on AJAX have trade-offs, such as slower updates and limitations for users with JavaScript disabled.

    Given that Breeze attempted an AJAX-based solution, it might be worth checking if other caching plugins (or custom implementations) could refine this approach to improve performance. If you need a tailored solution, I recommend consulting a developer who can implement dynamic caching methods, such as Edge Side Includes (ESI) or a similar approach, to load the currency selector dynamically without affecting full-page caching.

    Thank you.

    Thread Starter CaptainMorgan

    (@davehealey)

    Why has this been marked as resolved?

    I don’t think a custom solution solves the problem. I might be able to get a solution that works with one particular caching plugin on my site. But this problem affects every single user of the multi-currency feature and needs to be fixed at the source, you can’t expect everyone to commission a one-off custom solution for their website. I find it very strange that you would create a system that doesn’t work with page caching from the start.

    Plugin Support Moses M. (woo-hc)

    (@mosesmedh)

    Hi @davehealey,

    The issue has been marked as resolved because it isn’t a core plugin issue, but rather a conflict between other plugins, your caching plugin, and the multicurrency selector, which is beyond the support scope of this forum.

    While we’d like to assist, as mentioned, this falls outside our support scope, and it’s advisable to consult an expert since this is related to website customization rather than a core plugin issue.

    Thank you for your patience and understanding.

    Thread Starter CaptainMorgan

    (@davehealey)

    I think it’s a core plugin issue, your plugin does not work with any page caching plugins and this affects all of your users. If it’s not a core plugin issue then you are saying there is an issue with every caching plugin…

    As we agreed above the only real solution is to have separate cache files for each currency and this can only be done on the WooPayments side, I don’t see how a third-party could implement this.

    Thread Starter CaptainMorgan

    (@davehealey)

    Actually maybe that can be done on the caching plugin side… I’ll talk to the Breeze people and see what they say about it.

    Plugin Support Mahfuzur Rahman(woo-hc)

    (@mahfuzurwp)

    Hi @davehealey,

    I understand your concerns. As mentioned earlier, this issue stems from a conflict between the caching plugin and the multicurrency selector rather than a core WooPayments issue. Handling separate cache files for each currency would typically need to be addressed on the caching plugin’s side.

    It’s a great idea to check with the Breeze team to see if they have a solution.

    Thank you. Let us know if you have any more questions.

    Thread Starter CaptainMorgan

    (@davehealey)

    Does WooPayments multi-currency work with other currency selector plugins?

Viewing 15 replies - 1 through 15 (of 21 total)
  • You must be logged in to reply to this topic.