[英]WooCommerce lost-password endpoint/url gets replaced with wp-login?action=lostpassword
I have tried several methods but the lost-password is constantly replaced with:我尝试了几种方法,但丢失的密码不断被替换为:
wp-login?action=lostpassword
It's set in the woocommerce endpoint它在 woocommerce 端点中设置
I've even added the below in theme functions.php file:我什至在主题 functions.php 文件中添加了以下内容:
add_filter( 'lostpassword_url', 'my_lostpassword_url', 10, 2 );
function my_lostpassword_url( $lostpassword_url, $redirect ) {
$redirect = '/my-account/lost-password';
return site_url( '/wp-login.php?action=lostpassword' . $redirect );
}
Purged caches yet still, anytime i click on the URL to go to the password reset page, it defaults to wp-login.php?
清除缓存仍然存在,只要我点击 URL 到 go 到密码重置页面,它默认为
wp-login.php?
which doesn't work and just refreshes the My Account page.这不起作用,只会刷新“我的帐户”页面。
Any help will be much appreciated任何帮助都感激不尽
Removed this completely, reinstalled WooCommerce and added lost-password to the endpoints within WooCommerce Settings managed to overwrite wordpress settings完全删除这个,重新安装 WooCommerce 并将丢失密码添加到 WooCommerce 中的端点设置设法覆盖 wordpress 设置
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.