• Resolved CaptainMorgan

    (@davehealey)


    Hi,

    I’m using WooPayments with multi-currency support. When I select a currency on my site’s front end, and then go to another page, the currency resets to the site default. If I disable caching in the litepseed cache plugin the problem is resolved. I’ve tried excluding cookies and pages, php requests and all kinds of other combos but the only way I’ve managed to get it to work is by disabling caching entirely.

    Is anyone able to use Litespeed cache successfully with WooPayments + Multi-currency? Or is there a known solution? Thanks.

Viewing 15 replies - 1 through 15 (of 25 total)
  • Plugin Support qtwrk

    (@qtwrk)

    please provide the report number

    you can get it in toolbox -> report -> click “send to LiteSpeed”

    Thread Starter CaptainMorgan

    (@davehealey)

    Hi,

    Sorry for the delay, here’s the number: VGKGGPQH

    I’m excluding all of these cookies from my cache but it hasn’t helped with this issue, am I missing one?

    woocommerce_items_in_cart
    woocommerce_cart_hash
    woocommerce_recently_viewed
    wp_woocommerce_session_
    wcpay_currency
    wc_session

    Plugin Support qtwrk

    (@qtwrk)

    please try disable object cache

    Thread Starter CaptainMorgan

    (@davehealey)

    That didn’t help unfortunately

    Plugin Support qtwrk

    (@qtwrk)

    logically , if these cookie present, then page is not cached anymore

    please check the http response header of the page where it didn’t display the currency correctly

    specifically looking for x-ltiespeed-cache and/or x-litespeed-cache-control and share me its value.

    Thread Starter CaptainMorgan

    (@davehealey)

    x-litespeed-cache hit

    Thread Starter CaptainMorgan

    (@davehealey)

    Plugin Support qtwrk

    (@qtwrk)

    are these cookie present in your browser when you see cache hit ?

    Thread Starter CaptainMorgan

    (@davehealey)

    The only one from that list that I see is woocommerce_session_ followed by the session id

    Plugin Support qtwrk

    (@qtwrk)

    RewriteCond %{QUERY_STRING} currency=(.*)
    RewriteRule .* - [CO=multi_currency:%1:;]
    RewriteRule .* - [E=Cache-Vary:multi_currency]

    try this, please put it at top of your htaccess

    Thread Starter CaptainMorgan

    (@davehealey)

    Didn’t help, I tried with both object cache enabled and disabled.

    Thread Starter CaptainMorgan

    (@davehealey)

    @qtwrk Any other suggestions?

    Plugin Support qtwrk

    (@qtwrk)

    are you using OpenLiteSpeed?

    if so , you need to restart OLS after you changed .htaccess content to reload it

    Thread Starter CaptainMorgan

    (@davehealey)

    Yes I am using OLS. I restarted the server, also your snippet gave me a hint, I added multi_currency to the excludes under Do Not Cache Cookies, and that seems to have done the trick (and object cache is enabled).

    Thanks!

    • This reply was modified 1 year, 11 months ago by CaptainMorgan.
    Thread Starter CaptainMorgan

    (@davehealey)

    Ah I spoke too soon. It’s still not working, on some pages it’s showing the correct currency and on others it’s not. However the mini cart currency always seems to be correct, so that’s an improvement.

    • This reply was modified 1 year, 11 months ago by CaptainMorgan.
Viewing 15 replies - 1 through 15 (of 25 total)

The topic ‘WooPayments Multi-Currency Caching support’ is closed to new replies.