Stop WooCommerce taking over lost password URL

When you have WooCommerce installed, it hijacks the lost password URL with /my-account/lost-password/ you can revert to the original WordPress lost password URL by removing a filter to your themes functions.php file

/**
 * Remove WooCommerce /my-account/lost-password so default WordPress one can be used
 */
remove_filter( 'lostpassword_url', 'wc_lostpassword_url', 10 );

Now the default lost password url is restored – /wp-login.php?action=lostpassword

Leave all Comment