Fix WooCommerce lost password captcha #12
@@ -34,7 +34,9 @@ final class LostPasswordForm extends LoginLocation {
|
|||||||
{
|
{
|
||||||
parent::activate();
|
parent::activate();
|
||||||
add_action('lostpassword_form', [$this, 'render']);
|
add_action('lostpassword_form', [$this, 'render']);
|
||||||
add_action('lostpassword_post', [$this, 'process_form'], 10, 1);
|
if (!isset($_POST['woocommerce-lost-password-nonce'])) {
|
||||||
|
add_action('lostpassword_post', [$this, 'process_form'], 10, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function process_form(WP_Error $errors):void {
|
public function process_form(WP_Error $errors):void {
|
||||||
|
|||||||
+1
-1
@@ -107,7 +107,7 @@ if (!class_exists('Ogre\Captcha')) {
|
|||||||
$this->add_files([
|
$this->add_files([
|
||||||
'inc/location/woocommerce/class-checkout.php',
|
'inc/location/woocommerce/class-checkout.php',
|
||||||
'inc/location/woocommerce/class-login.php',
|
'inc/location/woocommerce/class-login.php',
|
||||||
// 'inc/location/woocommerce/class-lost-password.php',
|
'inc/location/woocommerce/class-lost-password.php',
|
||||||
'inc/location/woocommerce/class-register.php',
|
'inc/location/woocommerce/class-register.php',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user