Fix: Validating SI CAPTCHA on WooCommerce registration form
-
When I installed SI CAPTCHA, it showed up on the WooCommerce registration form (typically found at the https://mydomain.com/my-account/ URL). However, it would let you register with a blank or incorrect CAPTCHA field. In other words, SI CAPTCHA wasn’t checking the WooCommerce registration form at all.
Here’s the fix (add it to your theme’s functions.php file):
// Let's try some anti-spam on user registration add_filter( 'woocommerce_process_registration_errors', 'op_woocommerce_sicaptcha_registration_filter' ); function op_woocommerce_sicaptcha_registration_filter($errors) { if (class_exists('siCaptcha')) { $si_image_captcha = new siCaptcha(); $errors = $si_image_captcha->si_captcha_register_post($errors); } return($errors); }
Basically, we’re just telling WooCommerce to check for SI CAPTCHA errors before processing the registration form.
https://www.ads-software.com/plugins/si-captcha-for-wordpress/
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Fix: Validating SI CAPTCHA on WooCommerce registration form’ is closed to new replies.