• Resolved hermanandersson

    (@hermanandersson)


    Hey,

    I have a restricted access membership site where I use your plugin and it works great but I use WooCommerce to let users buy access to the memberships and I’m having quite a trouble getting the whitelisting of dynamic URLs to work.
    How can I whitelist all WooCommerce URLs for non logged in users?

    Regards,
    Herman

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' );
    Thread Starter hermanandersson

    (@hermanandersson)

    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)
  • The topic ‘Whitelist Woocommerce’ is closed to new replies.