This scenario will walk through how to leverage WooCommerce, WooCommerce Bookings, Groups, Groups for WooCommerce, and WooCommerce Subscriptions to facilitate seamless bookings for gym membership classes. In this scenario, classes (bookable products) are restricted to group members only.
Scenario
↑ Back to topYou own a gym that requires membership, and there are several activities at the gym including a Spin Class. The activity is only available to those who have an active membership and must be booked in advance.
![](https://woocommerce.com/wp-content/uploads/2014/08/bookings-use-cases-gym-membership-activities.jpg?strip=all&w=704)
Products Used
↑ Back to topSetup and Configuration
↑ Back to topWe’ll set this use case up in three steps:
- Create a group
- Create the subscrpition product
- Create the bookable product
Create a Group
↑ Back to topFirst, we’ll need to create a group to be used for those that subscribe to your product/class. Those subscribed to your product/class will be added to the group and given access to additional products that are otherwise hidden from the public. To create a group, follow these steps:
- In the sidebar of your WordPress Admin, click on Groups > Capabilities.
- Click on the New Capability button on the top.
- Under Capability, type gym_membership, then press Add.
- In the sidebar of your WordPress Admin, click on Groups > Groups.
- Click on the New Group button on top.
- Fill out the Name field. An example name is:
Gym Membership Activities
. - Click on the Capabilities dropdown and select the newly created capability. Then click Add.
![](https://woocommerce.com/wp-content/uploads/2014/08/Screenshot-2024-04-28-at-1.03.54-PM.png?strip=all&w=704)
You’re set! You’ve created a group that we’re going to assign users to.
Create a Subscription
↑ Back to topWe need to set up a Subscription Product to sell to our customers and assign it to a new group we created earlier. To set up a Subscription Product, follow these steps:
- In the sidebar of your WordPress Admin, click on Products > Add New.
- Give your product a name like Gym Membership.
- We’ll now want to set up the product data. In the Product data box, set the Product Type to Simple subscription. In the General tab, set the subscription price. In this example, we’ll set the price to $75 per month.
![](https://woocommerce.com/wp-content/uploads/2014/08/Annotation-on-2024-04-28-at-14-07-42.png?strip=all&w=704)
- Select the Groups tab. Click on the Add to Groups field box. You should now have the option to choose the selected group you created earlier. Add the group and press Publish to save your product.
![](https://woocommerce.com/wp-content/uploads/2024/04/Screenshot-2024-04-28-at-2.55.57-PM.png?w=980)
Whenever someone purchases this product, it will automatically add them to the Gym Membership group. If a user cancels, it will automatically remove them from that group. Only active subscribers will be in the group.
Create a Bookable Product
↑ Back to topNow we want users to be able to book activities based on the membership they purchased previously. We want to ensure, however, that only active members of the subscription have access to view this product. To create your bookable product for the class, follow these steps:
- In the sidebar of your WordPress Admin, click on Products > Add New.
- Give your product a name like Spin Class.
- In the Product data box, set the Product Type to Bookable product.
- We’ll set up some basic rules for the bookable product. The event/class is free, has a fixed block of 1 hour, and is only available for limited time on Saturday and Sunday.
![](https://woocommerce.com/wp-content/uploads/2014/08/image-1.png?w=980)
![](https://woocommerce.com/wp-content/uploads/2014/08/image.png?w=980)
- In the top right column of the Product Edit page, find the “Groups” box. Click on the field for Read. Select the new group that we created earlier.
![](https://woocommerce.com/wp-content/uploads/2014/08/image-2.png?strip=all&w=704)
- Publish the product and you’re set! Only those that have access to that group will be able to view this product. It is also hidden from your shop pages.
![](https://woocommerce.com/wp-content/uploads/2024/04/Screenshot-2024-04-28-at-3.49.50-PM.png?strip=all&w=704)
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.