Support » Plugin: Force Login » Whitelisting WooCommerce

  • Resolved franwess

    (@franwess)


    Hi there,

    What would be the best way to whitelist Woocommerce pages and some of the confirmation pages etc. generated by Woo upon payment.

    Kind regards
    Francois Wessels

    • This topic was modified 1 year, 6 months ago by  franwess.
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 instead. Something like this:

    /**
     * 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( 'order-received' ) ) {
          $bypass = true;
        }
      }
      return $bypass;
    }
    add_filter('v_forcelogin_bypass', 'my_forcelogin_bypass', 10);

    Hi Kevin,

    This is great, thank you very much!

    Just one question, would this work storewide or would I have to implement it on a per order basis?

    Kind regards
    Francois

    Plugin Author Kevin Vess

    (@kevinvess)

    It should be storewide – the logic in my example will bypass Force Login when the endpoint page for order received is being displayed.

    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 ‘Whitelisting WooCommerce’ is closed to new replies.