Tweak where message is added during reset to avoid needing a session Closes #4908
This commit is contained in:
parent
389bf99dad
commit
6e00477fd6
|
@ -826,9 +826,7 @@ class WC_Form_Handler {
|
|||
|
||||
do_action( 'woocommerce_customer_reset_password', $user );
|
||||
|
||||
wc_add_notice( __( 'Your password has been reset.', 'woocommerce' ) . ' <a href="' . get_permalink( wc_get_page_id( 'myaccount' ) ) . '">' . __( 'Log in', 'woocommerce' ) . '</a>' );
|
||||
|
||||
wp_redirect( remove_query_arg( array( 'key', 'login' ) ) );
|
||||
wp_redirect( add_query_arg( 'reset', 'true', remove_query_arg( array( 'key', 'login' ) ) ) );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -193,6 +193,8 @@ class WC_Shortcode_My_Account {
|
|||
$args['key'] = esc_attr( $_GET['key'] );
|
||||
$args['login'] = esc_attr( $_GET['login'] );
|
||||
}
|
||||
} elseif ( isset( $_GET['reset'] ) ) {
|
||||
wc_add_notice( __( 'Your password has been reset.', 'woocommerce' ) . ' <a href="' . get_permalink( wc_get_page_id( 'myaccount' ) ) . '">' . __( 'Log in', 'woocommerce' ) . '</a>' );
|
||||
}
|
||||
|
||||
wc_get_template( 'myaccount/form-lost-password.php', $args );
|
||||
|
|
Loading…
Reference in New Issue