bypass all woocommerce url’s
-
Hi,
I am having issues with dynamically generated urls. I have whitelisted all pages to ensure a user can pay for a an item whilst logged out. However they are not forwarded to the order received page since its dynamic:
[mydomain]/checkout/order-received/5304/?key=wc_order_5cffcfbc96028
I found this piece of code in a similar topic but it does not work for me and I can not access even the /cart/ page.
/**
* Bypass Force Login to allow for exceptions.
*
* @param bool $bypass Whether to disable Force Login. Default false.
* @return bool
*/
add_filter( ‘v_forcelogin_bypass’, ‘my_forcelogin_bypass’ );
function my_forcelogin_bypass( $bypass ) {
if ( class_exists( ‘WooCommerce’ ) ) {
if ( is_woocommerce() || is_wc_endpoint_url() ) {
$bypass = true;
}
}
return $bypass;
}Can you help me with this?
- The topic ‘bypass all woocommerce url’s’ is closed to new replies.