0

I'm using woocommerce membership with woocommerce subscriptions to allow users to buy one of the three levels of access of my website. The "A level" is free and gives a mininum of access, "B level" costs 10€ and gives more access to the site, whereas "C level" which costs 20€ allows user to access to the whole content.

How to allow users switching between the different level knowing that each level is a simple subscription product ?

I know this is possible with variable subscriptions but in my case, each level has his own description as we can often see on many websites like this example below, so I thought simple subscription products was the best option :

enter image description here

EDIT - MY SOLUTION Finally I found a way to overcome this. I have created a variable subscription with only one attribute called "type" with values "free","middle","premium" corresponding to A, B, C levels. The user will arrive on the page with the three offers as show in the image above. Each link add directly to the cart the product variation without going through the product page using the following url :

/checkout/?add-to-cart={variation_id} . The user is automatically redirected to the checkout page then using the following filter in functions.php :

add_filter ('woocommerce_add_to_cart_redirect', function( $url, $adding_to_cart ) {
    return wc_get_checkout_url();
}, 10, 2 );
Aurélien
  • 409
  • 1
  • 4
  • 12

1 Answers1

0

You are right, you can make that with variable subscriptions. Just create attribute first, then go to variables and add editing each product you can add different description. You can just copy it from your single-product and all styles will be applied too.

Attribute - Variable - Description (screenshot)

Denis
  • 1
  • 1