• Using WP-Optimize to evaluate and it is not working well with woocommerce. Produces Nonce is invalid on the cart when activated and even with cache turned off. Anyone had this problem and maybe a solution? Cache settings not relevant as it still produces the error just with the plugin activated and cache off.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support vupdraft

    (@vupdraft)

    If the “invalid nonce” error occurs on specific pages, consider disabling caching for those pages. Exclude the relevant pages from caching under Cache >> Advanced settings >> URL’s to exclude from caching

    Nonces are specific per user. If you have activated caching for logged in users, deactivate the cache for users who are currently logged in.

    If you continue to experience nonce-related issues, you can disable nonce verification by using the filter;

    add_filter( ‘woocommerce_store_api_disable_nonce_check’, ‘__return_true’ );

    Thread Starter blobmallett

    (@blobmallett)

    Thanks for that suggestion but as I said just activating the plugin with the cache turned off causes the Nonce error. I just tried it again and stepping through the cart is OK but if I go to cart and remove a product it will not delete and just says Nonce is invalid on the page. I can’t adjust cache settings as it is not even on.

    Thread Starter blobmallett

    (@blobmallett)

    Also the filter is not recommended:

    NOTE: This should only be done on development sites where security is not important. Do not enable this in production.

    Plugin Support vupdraft

    (@vupdraft)

    Can you clear any server cache as well as your browsing history/cookies, what is your site URL?

    Thread Starter blobmallett

    (@blobmallett)

    Thanks. The URL is http://www.jtpml.co.uk/. The Nonce error clears as soon as I deactivate the plugin and returns immediately if I re-activate. It is currently deactivated.

    Plugin Support jbgupdraft

    (@jbgupdraft)

    Hi,

    Can you try disabling the Javascript minification features in WP-Optimize > Minify? I’m browsing the site now and see that there are some minified scripts, and when visiting the cart I also noticed that the cart was already filled with a couple of items which normally shouldn’t be the case since it’s my first visit to the site.

    For the nonce errors, are you seeing these in the PHP error log or in the browser console? I’m not seeing them in the browser console so just wanted to double check this with you.

    Thanks!

    Plugin Support vupdraft

    (@vupdraft)

    Your site does not have a valid ssl certficate

    A “nonce verification failed” error in WooCommerce is often indirectly caused by SSL/HTTPS configuration issues, mixed content errors, or aggressive caching. Since nonces are used for security, a mismatch between the HTTP and HTTPS versions of your site or expired caching causes the validation to fail.

    I do hear that you have not enabled caching in WPO but could you make sure that your hosts have flushed your server cache?

    Can you do this and set up your SSL certificate and see if the issue persists?

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.