1

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.

0

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.

  • 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 );
0

You can do this without code by going to the WooCommerce administration, Settings, Advanced, and removing the "lost-password" text from the Lost password field under Account Endpoints: arrow pointing to lost password field

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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