PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, January 30, 2022

[FIXED] WooCommerce lost-password endpoint/url gets replaced with wp-login?action=lostpassword

 January 30, 2022     php, woocommerce, wordpress     No comments   

Issue

I have tried several methods but the lost-password is constantly replaced with:

wp-login?action=lostpassword 

It's set in the woocommerce endpoint

I've even added the below in theme functions.php file:

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? which doesn't work and just refreshes the My Account page.

Any help will be much appreciated


Solution

Removed this completely, reinstalled WooCommerce and added lost-password to the endpoints within WooCommerce Settings managed to overwrite wordpress settings



Answered By - JustCode
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing