Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Change URL in Password Reset Email

$
0
0

Replies: 0

I don’t want to use the default Password Reset of WooCommerce, so I remove it from the endpoint in WooCommerce Settings then use the below hook to replace the URL.

function wdm_lostpassword_url() {
    return site_url('/password-recovery');
}
add_filter( 'lostpassword_url',  'wdm_lostpassword_url', 10, 0 );

It’s working fine, however, the URL in the email is the problem.
https://domain.com/my-account/lost-password/?key=PWKdexxnkchEQ3ZAyDsX&id=2
When clicking that link, 404 error page not found will show up.

How can I change the URL of it to something;
https://domain.com/password-recovery/?key=PWKdexxnkchEQ3ZAyDsX&id=2


Viewing all articles
Browse latest Browse all 59525

Trending Articles