最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

WooCommerce changes lost password reset link

programmeradmin10浏览0评论

When I activate WooCommerce plugin, the lost your password does not work and can't sent password reset email to users. But when I deactivate WooCommerce, the lost your password link at login page starts working. Is it possible to not use WooCommerce link because it is not working and changes the reset link.

When I activate WooCommerce plugin, the lost your password does not work and can't sent password reset email to users. But when I deactivate WooCommerce, the lost your password link at login page starts working. Is it possible to not use WooCommerce link because it is not working and changes the reset link.

Share Improve this question edited Nov 10, 2018 at 18:03 Krzysiek Dróżdż 25.5k9 gold badges53 silver badges74 bronze badges asked Nov 10, 2018 at 16:50 jazejaze 901 gold badge1 silver badge6 bronze badges
Add a comment  | 

3 Answers 3

Reset to default 4

I hope think this may work.

Insert this code into php file or php insert plugin, WooCommerce will no longer change password reset link.

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

If you'd like to do this without code, open the WordPress admin and then click "WooCommerce", "Settings", "Advanced". Under "Account Endpoints", delete "lost-password" from the "Lost password" field.

Another way to do this is to add this to your theme's functions.php file:

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

This removes the modification added by WooCommerce.

发布评论

评论列表(0)

  1. 暂无评论