@ananddevops, we use the WooCommerce login form for vendors too. Hence, the lost password will also come from WooCommece My Account page.
@dualcube
Thanks, will discuss with them and understand whats happening.
@dualcube
Just confirming this again. I checked the WooComm endpoints of lost password and also checked in frontend the Vendor Dashboard page Lost Password link.
It looks like the link actually leads to the wp-login lost password rather than woocomm one. Since I am doing a front end check, I might be wrong. Hence a double check.
See screenshot
Sorry, I noticed you were right about the link .
But somehow the href is populating out to be https://www.kriti.online/wp-login.php?action=lostpassword
Which is what confused me.
So I am trying to hide the same as of now, tried this code, but with no knowledge in CSS can’t get thy syntax right for this
.p.woocommerce-LostPassword.lost_password {
display: none;
}
Kindly suggest.
@ananddevops, as you need to direct the vendors to the WooCommerce My Account lost password, then use this filter – lostpassword_redirect and set the url.
For further information look into – https://codex.ww.wp.xz.cn/Plugin_API/Filter_Reference/lostpassword_redirect
Tried this code instead
add_filter( 'lostpassword_url', 'my_lost_password_page', 10, 2 );
function my_lost_password_page( $lostpassword_url, $redirect ) {
return home_url( '/lostpassword/?redirect_to=' . '/my-account/lost-password/' );
}
And it works, but then I got a page not found error that I had not created the WooComm pages for one my application testing purposes.
Hence going back to temp solution until I can figure a wrapper is the CSS option
.woocommerce-LostPassword .lost_password {
display: none;
}
Can’t seem to get it to work with no knowledge in css. Kindly help correct.
Thanks
Actually managed to do the same using code in the functions.php
function remove_lost_your_password($text)
{
return str_replace( array('Lost your password?', 'Lost your password'), '', trim($text, '?') );
}
add_filter( 'gettext', 'remove_lost_your_password' );
Thnaks a lot.