Bookings Use Case: Book Yoga Classes after pre-purchase of 10 sessions (Using Smart Coupons and Min/Max Quantities)

This bookings use case will walk through how to use WooCommerce and WooCommerce Bookings to allow customers to pre-purchase a block of classes, and then apply that credit to future bookings.

The feature to apply pre-purchased credit to future bookings, as well as limit the number of bookings that can be made, relies on two additional plugins: Smart Coupons and Min/Max Quantities.

Scenario

↑ Back to top

You have a yoga studio and would like to offer the option to pre-purchase 10 sessions at a 10% discount.

The customer first purchases a 10-pack of coupons. They can then use the purchased coupons to book up to 10 yoga sessions at a day and time of their choosing.

Products Used

↑ Back to top

For this scenario, you will need to first purchase and install all four of the following plugins:

Setup and Configuration

↑ Back to top

Create the Yoga Class Bookable Products

↑ Back to top

If you do not already have bookable products set up for your Yoga Classes, go ahead and create them. The classes can be set up for any day or time, with any prices.

More information on how to create the basic Class Products is found under Creating a Bookable Product.

For example, you could create a Yoga Class that runs several times a week for an hour at a time, at a cost of $20 per class.

Bookings Use Case - Yoga Class - Class Bookable Product
Image shows customer view for a yoga class bookings use case.

Create the Coupon

↑ Back to top

The 10-pack of classes will take the form of 10 coupon codes, each of which can be applied to the Yoga Class bookable product, one time each for each code. The customer will purchase the pack of coupon codes, then apply those codes to the actual Yoga Class product when they want to redeem a class.

These coupon codes are generated using the basic WooCommerce Coupons functionality plus added options created with the Smart Coupons plugin.

To create the coupon template:

  1. Go to your website’s dashboard.
  2. Click on Marketing > Coupons on your dashboard menu and click the “Add Coupon” button at the top of the screen.
  3. Assign a coupon code to the coupon in the top box, for example, “yogaclass-fulldiscount.”
  4. On the General tab, set the Discount Type to “Percentage discount” and the Coupon Amount to 100, for a 100% discount. This means the coupon will allow them to book a class for free, as they already paid for the class when purchasing the coupon set.
  5. Check off the Smart Coupon option Auto Generate New Coupons With Each Item. This will reveal a few new options.
  6. Set the coupon to be Valid For 1 Year (if applicable, or adjust the timing here for your needs).
  7. Use the Coupon Code Format box to set a prefix for the 10 custom coupon codes that are generated for the customer. See Image 1 below.
  8. On Usage restrictions tab, set the product that the coupon can be used for, e.g., the Yoga Class Bookable Product. See Image 2 below.
  9. On the Usage limits tab, set the usage limit per coupon to 1, so that each coupon can only be used once. See Image 3 below.
  10. Publish the coupon using the blue Publish button in the top right.
Bookings Use Case - Yoga Class - Coupon General Settings
Image 1: Percentage discount coupon setting.
Bookings Use Case - Yoga Class - Coupon Usage Restrictions
Image 2: Usage restrictions settings in coupons
Bookings Use Case - Yoga Class - Coupon Usage Limits Settings
Image 3: Coupon usage limit settings

Create the Coupon Product

↑ Back to top

Now we want to allow customers to buy a 10-pack of coupon codes, at a discount. This will be a Simple Product as it is just a set of coupons that will be added in their account; it does not represent a specific booking of a class until the coupon codes are applied to a specific day and time on the Yoga Class bookable product.

  1. Go to your website’s dashboard.
  2. Click Products > Add New on your dashboard to create a new product. Set it to be a Simple Product in the Product Data box.
  3. Mark the product as Virtual as there is no physical component to the coupons.
  4. Set the price for the product. Note that this price is the price for a single coupon; we will use the quantity field below to force the customer to buy 10 at a time. You could use a Regular Price that is the price of the Yoga Classes, and a Sale Price that showcases the discount they are getting by buying the 10-pack.
  5. In the Coupons box, select the coupon you created above (in our example, this is named “yogaclass-fulldiscount”). This box only appears if you have Smart Coupons installed and active.
  6. In the Group of… box, enter 10, which will require customers to purchase this coupon as a group of 10 only. This box only appears if you have Min/Max Quantities installed and active.
  7. Publish the 10-pack Coupon Simple Product with the blue Publish button in the top right.
Bookings Use Case - Yoga Class - Simple Product for the Coupon 10 pack purchase
Image shows how to assign a coupon code to a product that represents a pack of 10 discount codes.

Customer Experience

↑ Back to top

Purchasing coupons

↑ Back to top

Customers will start out by purchasing the pack of 10 yoga classes, which is a simple product. This shows the price per class and that they’ll be purchasing 10 classes. The customer will click “Add to cart” to add a single 10-pack of coupons to their cart.

Bookings Use Case - Yoga Class - Coupon Code Product
First purchase the 10 pack coupon product!

Once the customer has completed the checkout process, the coupons are available via My Account under Orders, as well as display in the cart and checkout for relevant products.

Bookings Use Case - Yoga Class - Order with Coupons
Customer view of their coupon codes in My Account

Purchasing a class using a coupon

↑ Back to top

Customers go to the Yoga Class bookable product in your shop, and select a specific day and time using the calendar. They then add that specific class to their cart using the Book Now button, seeing the normal cost.

In the cart, customers can enter one of their coupon codes in the Coupon Code box and click Apply coupon to apply the coupon. This reduces the cost of the class to $0. The customer proceeds through the usual checkout flow to confirm the booking, but won’t need to pay anything for the class.

If they check their My Accounts page, they’ll see that the number of available coupons is reduced by one.

Bookings Use Case - Yoga Class - Coupon Applied
Using the coupon on the bookable product

Refund or cancellation returns the coupon

↑ Back to top

If the booking is cancelled or refunded, the coupon is returned to the customer so they can use it again.

Questions and Support

↑ Back to top

Something missing from this documentation? Do you still have questions and need assistance?

  • Have a question before you buy this extension? Please fill out this pre-sales form – please include the name of this extension in your query.
  • Already purchased and need some assistance? Get in touch with a Happiness Engineer via the WooCommerce.com Support page and choose this extension name from the “I need help with” dropdown