Merge pull request #8351 from MikeHansenMe/master
Fix broken password reset
This commit is contained in:
commit
a3ed5efcd9
|
@ -130,10 +130,15 @@ function wc_edit_address_i18n( $id, $flip = false ) {
|
||||||
* @access public
|
* @access public
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function wc_lostpassword_url() {
|
function wc_lostpassword_url( $default_password_reset_url ) {
|
||||||
return wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) );
|
$wc_password_reset_url = wc_get_page_permalink( 'myaccount' );
|
||||||
|
if ( false !== $wc_password_reset_url ) {
|
||||||
|
return wc_get_endpoint_url( 'lost-password', '', $wc_password_reset_url );
|
||||||
|
} else {
|
||||||
|
return $default_password_reset_url;
|
||||||
}
|
}
|
||||||
add_filter( 'lostpassword_url', 'wc_lostpassword_url', 10, 0 );
|
}
|
||||||
|
add_filter( 'lostpassword_url', 'wc_lostpassword_url', 10, 1 );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue