• Resolved okancolak

    (@okancolak)


    It looks like this plugin is using nonces. All HTML caching plugins & mechanisms cache nonces too so after a while (maybe like 24h) they become unavailable and this plugin gives the error : “Something went wrong. Please try again or choose another payment source.“.

    We don’t want to deactivate caching as it is very important for speed and we don’t want the cache to be cleared every 12h or so.

    Dev console : "Could not validate nonce.” (file : /wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/assets/js/button.js)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @okancolak

    First, I want to clarify that PayPal button scripts should never be cached. You can find more information about this in the plugin documentation here.

    All HTML caching plugins & mechanisms cache nonces too

    This is not entirely accurate. Many reputable caching plugins offer the ability to exclude certain elements, such as specific URLs or scripts, from being cached. We recommend looking into these settings with your caching plugin to ensure that nonces and PayPal button scripts are not being cached, as this can lead to the exact issues you’re describing.

    Caching nonces for longer periods than the default defeats their original purpose, as the same nonce could be used multiple times, which could raise potential security concerns.

    I hope this helps resolve the issue you’re facing! If you need any further assistance, feel free to reach out.

    Kind Regards,

    Krystian

    Thread Starter okancolak

    (@okancolak)

    I can exclude Paypal script, that’s ok. But, very popular caching plugins don’t actually include an option to disable caching for Nonces without disabling it for the whole page that has nonces.

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