Merge pull request #17396 from woocommerce/fix/17379
Prevent cookie header sent error, and improve error message wording
This commit is contained in:
commit
a3ec0bf85a
|
@ -220,8 +220,6 @@ class WC_Shortcode_My_Account {
|
|||
'key' => $rp_key,
|
||||
'login' => $rp_login,
|
||||
) );
|
||||
} else {
|
||||
self::set_reset_password_cookie();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -327,8 +325,7 @@ class WC_Shortcode_My_Account {
|
|||
$user = check_password_reset_key( $key, $login );
|
||||
|
||||
if ( is_wp_error( $user ) ) {
|
||||
wc_add_notice( $user->get_error_message(), 'error' );
|
||||
|
||||
wc_add_notice( __( 'This key is invalid or has already been used. Please reset your password again if needed.', 'woocommerce' ), 'error' );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue