Tweak where message is added during reset to avoid needing a session Closes #4908

This commit is contained in:
Mike Jolley 2014-02-26 13:13:53 +00:00 committed by Coen Jacobs
parent 389bf99dad
commit 6e00477fd6
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}
}

View File

@ -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 );