This bookings use case walks through how you can use WooCommerce and WooCommerce Bookings to allow customers to pre-purchase a pack of classes, and then apply those credits to make future bookings.
The feature to apply pre-purchased credit to future bookings relies on Smart Coupons. Limiting the number of bookings that can be made, relies on Min/Max Quantities.
Scenario
↑ Back to topYou 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 topFor this scenario, you will need to first purchase and install all four of the following plugins:
Setup and Configuration
↑ Back to topCreate the Yoga Class Bookable Product
↑ Back to topIf 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.
Create the Coupon
↑ Back to topThe 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:
- Go to your website’s dashboard.
- Click on Marketing > Coupons on your dashboard menu and click the “Add Coupon” button at the top of the screen.
- Assign a coupon code to the coupon in the top box, for example, “yogaclass-fulldiscount.”
- 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.
- Check off the Smart Coupon option Auto Generate New Coupons With Each Item. This will reveal a few new options.
- Set the coupon to be Valid For 1 Year (if applicable, or adjust the timing here for your needs).
- Use the Coupon Code Format box to set a prefix for the 10 custom coupon codes that are generated for the customer.
- On Usage restrictions tab, set the product that the coupon can be used for, e.g., the Yoga Class Bookable Product.
- On the Usage limits tab, set the usage limit per coupon to 1, so that each coupon can only be used once.
- Publish the coupon using the blue Publish button in the top right.
Create the 10-pack Product
↑ Back to topNow 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.
- Go to your website’s dashboard.
- Click Products > Add New on your dashboard to create a new product. Set it to be a Simple Product in the Product Data box.
- Mark the product as Virtual as there is no physical component to the coupons.
- 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.
- 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.
- 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.
- Publish the 10-pack Coupon Simple Product with the blue Publish button in the top right.
Customer Experience
↑ Back to topPurchasing coupons
↑ Back to topCustomers 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.
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.
Purchasing a class using a coupon
↑ Back to topCustomers 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.
Refund or cancellation returns the coupon
↑ Back to topIf the booking is cancelled or refunded, the coupon is returned to the customer so they can use it again.
Questions and Support
↑ Back to topSomething missing from this documentation? Do you still have questions and need assistance?
- Have a question about a specific extension or theme you’d like to purchase? Click here.
- 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.