WooCommerce – Whitelist Password Reset link
-
Hello,
I am using this plugin to require login for my site. But I need the password reset link to work, and it currently does not.
I am trying to use this code
`//**
* Bypass Force Login to allow for exceptions.
*
* @return bool Whether to disable Force Login. Default false.
*/
function my_forcelogin_bypass( $bypass ) {
if ( class_exists( ‘WooCommerce’ ) ) {
if ( is_wc_endpoint_url( ‘my-account/lost-password’ ) ) {
$bypass = true;
}
}
return $bypass;
}
add_filter( ‘v_forcelogin_bypass’, ‘my_forcelogin_bypass’ );But I get this error. I am using the Snippets plugin to insert it, but I also tried directly into the Functions.php
The snippet has been deactivated due to an error on line 7:
Cannot redeclare function my_forcelogin_bypass.The page I need help with: [log in to see the link]
- The topic ‘WooCommerce – Whitelist Password Reset link’ is closed to new replies.