How to Resolve ‘rest_cookie_invalid_nonce’, ‘Cookie nonce is invalid’, ‘Cookie check failed’ Errors
Sometimes you or your site visitors might experience issues related to caching while using WP Simple Pay.
In most cases, this is because your web host has its own caching rules in place, or you have a caching plugin configured on your site. Both are good things for your site’s overall load times and performance, but can block or break some functionality of WP Simple Pay.
If your site visitors see a message similar to Cookie nonce is invalid, Cookie check failed, or
rest_cookie_invalid_nonce this means that your site’s nonce tokens are being cached and reused beyond their designated time frame. WordPress’ nonces can be used for 12 hours before they become invalid.
To avoid expired nonces from being sent to WP Simple Pay, you must ensure pages with WP Simple Pay forms are not cached, or not cached for longer than 12 hours.
- Set the cache limit in WP Fastest Cache
- Set the cache limit in WP Rocket
- Set the cache limit in W3 Total Cache (see Garbage Collection Interval)
- Set the cache limit in WP Super Cache (see Garbage Collection)