• Resolved opus13i

    (@opus13i)


    When a user goes to the login page @ /wp-login.php and attempts to reset their password (“lost your password?”) the page simply refreshes.

    The URL has a redirect call added pointing at /my-account/lost-password/ which is the standard woocommerce url for password resets.

    Is Force Login not compatible with Woocommerce?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kevin Vess

    (@kevinvess)

    Force Login only allows visitors to view the standard WordPress login, register, and lost password screens.

    Any other custom login, register, or lost password URL will need to be whitelisted or bypassed.

    Try adding the following script to your theme’s functions.php:

    /**
     * Bypass Force Login to allow for exceptions.
     * 
     * @return bool
     */
    function my_forcelogin_bypass( $bypass ) {
      if ( class_exists( 'WooCommerce' ) && is_account_page() ) {
        $bypass = true;
      }
      return $bypass;
    }
    add_filter('v_forcelogin_bypass', 'my_forcelogin_bypass', 10, 1);
    
    Thread Starter opus13i

    (@opus13i)

    That was the trick. Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘No method to reset password?’ is closed to new replies.