Support » Plugin: Force Login » Whitelist Woocommerce

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

    (@kevinvess)

    Hi– thanks for using Force Login!

    I suggest you try the v_forcelogin_bypass filter with WooCommerce Conditional Tags. For example:

    /**
     * Bypass Force Login to allow for exceptions.
     *
     * @param bool $bypass Whether to disable Force Login. Default false.
     * @return bool
     */
    function my_forcelogin_bypass( $bypass ) {
      if ( class_exists( 'WooCommerce' ) ) {
        if ( is_woocommerce() || is_wc_endpoint_url() ) {
          $bypass = true;
        }
      }
      return $bypass;
    }
    add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass' );

    Hey!

    Thank you for your support!
    It works perfectly!

    Regards,
    Herman

    Plugin Author Kevin Vess

    (@kevinvess)

    Excellent, I’m glad you got it working!

    Be sure to rate and review my plugin to let others know how you like it.

    Thanks for using Force Login!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.