Woocommerce redirect in the same page after reset account
-
I’m new on coding and I’m using woocommerce on my wordpress website
The problem is: when I click on “Save” on the reset password button the page keeps refreshing on the same reset password page (without box messages etc.).
No caching plugins added AND I’ve already tried to add a redirection in my theme’s function.php after clicking on “save the new password button” (code below)
/**
* Reset password redirect.
*
* @param WP_User $user
*/
function iconic_reset_password_redirect( $user ) {
wc_add_notice( __( ‘Your password has been reset successfully.’, ‘woocommerce’ ) );
wp_safe_redirect( wc_get_page_permalink( ‘myaccount’ ) );
exit;
}
add_action( ‘woocommerce_customer_reset_password’, ‘iconic_reset_password_redirect’, 10 );Can You suggest me a solution to this?
Thank you and regards
- The topic ‘Woocommerce redirect in the same page after reset account’ is closed to new replies.