Merge pull request #17396 from woocommerce/fix/17379

Prevent cookie header sent error, and improve error message wording
This commit is contained in:
Gerhard Potgieter 2017-10-26 17:03:17 +02:00 committed by GitHub
commit a3ec0bf85a
1 changed files with 1 additions and 4 deletions

View File

@ -220,8 +220,6 @@ class WC_Shortcode_My_Account {
'key' => $rp_key, 'key' => $rp_key,
'login' => $rp_login, '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 ); $user = check_password_reset_key( $key, $login );
if ( is_wp_error( $user ) ) { 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; return false;
} }