• Resolved joe16

    (@joe16)


    Hi,

    While setting up Stripe for WooCommerce (from WooCommerce team) on a production site with LSCache enabled, I faced an update issue caused by the cache. Actually, when I update the settings of the Stripe plugin and save, the page refreshes with the old configuration values. Here are some examples:

    1. When I click on the “Edit account keys” button, edit the fields and then save the changes by clicking on “Save live keys” or “Save test keys”, this causes the page to reload. And when I display the keys dialog again through the “Edit account keys” button, I don’t find the entered key.
    2. The same happens when enabling the test mode: I check the “Enable test mode” checkbox, I save, when I refresh the page, the checkbox of “Enable test mode” is unchecked.
    3. Also, I cannot save the payment methods: I disabled both “Express checkouts” method “Apple Pay / Google Pay” and “Link by Stripe” and saved. When I refresh the page, both payment method are enabled again.

    When I disable the LiteSpeed Cache, the changes are reflected after saving.

    I wasn’t expecting this behavior, meaning having the cache enabled at the back office level. Usually, the cache would work only on the front office.

    I don’t know if I configured something wrongly.

    Please give me your advice.

    Looking forward to your reply.

    My best regards,

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

    (@qtwrk)

    please provide the report number , you can get it in toolbox -> report -> click “send to LiteSpeed”

    and please try disable object cache if you have it enabled.

    Thread Starter joe16

    (@joe16)

    Hi @qtwrk,

    Thank you for your reply.

    I have just sent you the report as requested.

    Regarding the object cache: yes, it was enabled. Do you mean I have to disable it all the time or just when I edit the Stripe settings?

    Looking forward to your reply.

    My best regards,

    Plugin Support qtwrk

    (@qtwrk)

    thanks, once you clicked send button , it will generate a 8 letter string , please share me that so I can locate your report.

    yes , please try with the object cache, see how it goes first.

    Thread Starter joe16

    (@joe16)

    Here is the report number:?ECTBZCHB

    Plugin Support qtwrk

    (@qtwrk)

    have you tried with object cache disabled ?

    Thread Starter joe16

    (@joe16)

    Hi @qtwrk,

    When I disable the object cache, the issue persists.

    In order to be able to reflect the updates after editing and saving, I had to disable caching: under “[1] cache”, I toggled off the “Enable Cache” option.

    Shouldn’t the cache only by applied on the front office side and not on the back office side?

    Looking forward to your reply.

    My best regards,

    • This reply was modified 9 months, 1 week ago by joe16.
    Plugin Support qtwrk

    (@qtwrk)

    is that setting within wp-admin URI ?

    and please check the HTTP response header over it , in particular, the value of x-litespeed-cache header

    Thread Starter joe16

    (@joe16)

    Yes, this is the URL where I enable/disable the cache settings https://mywebsite.com/wp-admin/admin.php?page=litespeed-cache#cache

    When I load the stripe setup page (with cache enabled) and check the response header, here is what I find (no cache):

    X-Litespeed-Cache-Control: no-cache

    But the issue still persists: when I check a new payment method and save, the update is not reflected even after reloading the page.

    Please try to reproduce the scenario on your side.

    Plugin Support qtwrk

    (@qtwrk)

    no no , not the cache setting, I was referring the stripe setting page , is that within wp-admin ?

    check by dev tool , it may call some wp-rest URI or something

    Thread Starter joe16

    (@joe16)

    Yes, the Stripe setting page is within wp-admin: https://mywebsite.com/wp-admin/admin.php?page=wc-settings&tab=checkout&section=stripe&panel=methods (this Stripe setting page is for choosing payment methods)

    Could you please add further info about wp-rest URI. I didn’t find any call including “wp-rest”, while saving the stripe setting page.

    I guess I found the cause of the issue. With LSCache enabled, when I save the payment methods page while checking the console, I found a cache hit indication (X-Lsadc-Cache: hit,private). Please check screenshot https://postimg.cc/LJTcrTdq

    Plugin Support qtwrk

    (@qtwrk)

    aha , that’s exactly what I meant , try go to Cache -> Cache REST, set it to OFF, purge all , and check that URI again about the header

    • This reply was modified 9 months ago by qtwrk.
    Thread Starter joe16

    (@joe16)

    Great! That was the issue. I toggled off “Cache REST API” and Stripe setting update works correctly with both cache ([1] Cache) and object cache ([6] Object) enabled. The header shows X-Litespeed-Cache-Control: no-cache.

    Thank you very much for your help!

    What are the other caching options that should be disabled in the context of a WooCommerce store ? Thank you in advance.

    Plugin Support qtwrk

    (@qtwrk)

    it depends on your site, so I can’t really simply say which ones , just this one , if the site is not using stripe, then no need to disable

    Thread Starter joe16

    (@joe16)

    OK, I see. Could you please point me to the documentation where I can learn further about the settings that should be applied in the context of a WooCommerce store (in my case I will be using also PayPal and a couple of other WooCommerce related plugins)?

    Plugin Support qtwrk

    (@qtwrk)

    perhaps this page will help

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Stripe settings not updated after modification due to cache’ is closed to new replies.