0

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.

-1

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.

  • Thank you so much.This works – beginner Jan 11 at 6:48
  • If this answer is usefull for you then please mark as a accepted answer. Thanks :) – Pratik Patel Jan 11 at 6:50
1

You can remove the filter that WooCommerce uses to replace the lost password URL like so:

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.