Nevermind, I figured it out. The standard lost password action was getting in the way.

This commit is contained in:
Cooper Dalrymple
2026-08-26 17:30:44 -05:00
parent 1539a6fc06
commit d1a2758514
2 changed files with 4 additions and 2 deletions
@@ -34,8 +34,10 @@ final class LostPasswordForm extends LoginLocation {
{ {
parent::activate(); parent::activate();
add_action('lostpassword_form', [$this, 'render']); add_action('lostpassword_form', [$this, 'render']);
if (!isset($_POST['woocommerce-lost-password-nonce'])) {
add_action('lostpassword_post', [$this, 'process_form'], 10, 1); 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 {
$this->process($errors); $this->process($errors);
+1 -1
View File
@@ -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',
]); ]);
} }