wc_add_notice in woocommerce checkout provoking incorrect “Captcha is invalid”
-
I have integrated this plugin and put it in front of our woocommerce checkout.
All is going generally well, but I am experiencing an issue. Here are the steps to repro:1. Navigate to checkout page, fill out all checkout fields and complete the hCaptcha
2. Click “place order” and the checkout page will stop the checkout by throwing a wc_add_notice() error. This can be provoked in a number of ways. You can skip entering a mandatory field such as an email. On my site, we have some custom validation that throws wc_add_notice() errors on checkout. Anything works.
3. Fix the checkout field which provoked the error. At this point, hCaptcha will still have a green checkmark indicating that the captcha is still valid.
4. Click “place order”. hCaptcha will throw “The Captcha is invalid.” despite having a green check mark indicating that the captcha is still valid.
On my site, the only way to fix and get through the checkout is to either wait for the captcha to expire or refresh the page and start over.
Any tips to remedy this issue on my end would be much appreciated. My desired functionality would be to have the initial successful hCaptcha validation continue to be valid for the next form submit
- The topic ‘wc_add_notice in woocommerce checkout provoking incorrect “Captcha is invalid”’ is closed to new replies.