Lost password link redirects to my-account/lost-password/,how to fix it back to default lost password

My lost password option in the wp login page redirect to woocommerce lost password page.How to set it back to the standard wp lost password option.?I want it to redirect to “wp-login.php?action=lostpassword”.
I am using,woocommerce,paid membership pro,buddypress plugins.
I found this Lost password link is redirecting to /shop/my-account/lost-password/, but I couldn’t understand it.

Thanks.

4 Answers
4

Try to put below code into your theme functions.php file

remove_filter( 'lostpassword_url', 'wc_lostpassword_url', 10 );

OR

function reset_pass_url() {
    $siteURL = get_option('siteurl');
    return "{$siteURL}/wp-login.php?action=lostpassword";
}
add_filter( 'lostpassword_url', 'reset_pass_url', 10, 2 );

Please let me know if any query.

Hope it will help you.

Leave a Comment