Forcing membership on woocommerce cart
-
Hi,
Would it be possible to force a membership onto the cart, if a user is trying to buy a product, but isn’t a member? So if i’m not a member, it will add a membership to cart/checkout alongside the product i’m buying. I have made the function like this:
function force_membership_on_cart() { if(pmpro_hasMembershipLevel('1')) { // go to checkout } else { //force to cart here } }
I have searched as much as i have possibly could in the source files, but i can’t seem to find any add to cart/checkout/gateway code. The membership should be non removal.
Any suggestions here?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Forcing membership on woocommerce cart’ is closed to new replies.