Using the WooCommerce Subscriptions plugin with Toolset en WordPress
When you need to handle time-limited accounts you should use a plugin like WooCommerce Subscriptions. It allows you to create new user accounts during the checkout.
You cannot use Toolset User Forms to create subscriptions because accounts they create never expire.
On this page, we explain how to setup the WooCommerce Subscriptions plugin to create expirable user profiles with a custom role. We also show the flow from the end-user’s perspective.
How to setup WooCommerce Subscription
Install and activate the WooCommerce Subscriptions plugin.
Go to the WooCommerce → Settings page and switch to the Subscriptions tab.
In the Roles section, setup the following fields:
Subscriber Default Role
Inactive Subscriber Role
Subscriber Default Role
This is the role a user will be assigned after a successful purchase and the subscription’s activation.
Besides regular roles, you can also select any custom role you have created using the Toolset Access plugin.
Inactive Subscriber Role
This is the role a user will be assigned after the subscription expires. Choose a role that has limited privileges, for example Subscriber.
You need to make sure that the role selected here doesn’t have access to recourses available only for paying members. You can control this on the Custom Roles tab of the Toolset → Access Control page.
Switch to the Accounts tab.
Check the following options:
Allow customers to create an account during checkout.
Allow customers to log into an existing account during checkout.
(Optional) Leave the Account creation fields unchecked.
(Optional but useful) Go to Products → Display. Check the Redirect to the cart page after successful addition option so that your customer will be redirected to the checkout page immediately after pressing the sign up button.
Make sure you have at least one proper payment method configured on the Payments tab. The payment method must support subscriptions.
Creating a subscription product
A subscription is a special type of WooCommerce product. In addition to the product price, you set up how frequently the renewal is required – e.g. every 2 weeks, every month, etc.
Go to Products → Add New to create a new product and use the following steps:
Switch from Simple Product to Simple Subscription.
Make the product a Virtual one.
Set up the Subscription price and duration time.
Publish your product.
Your subscription is now configured and you’re ready to start selling it.
Frequently asked questions
Can I offer a subscription with different prices for different billing periods?
An example:
Monthly – price: $10
Every three months – price: $25
Yearly – price $85
Yes, you can. Use a Variable Subscription instead of Simple Subscription as your product type.
Can I create two (or more) subscriptions with a different role for each subscription?
No, you cannot. The role you set up in WooCommerce Subscription (see step 3, Subscriber Default Role) is a global one and applies to all your subscription products.
Can I add new users using a Toolset User Form (so I can use some additional user fields) and connect it with a Subscription Product in the same way I can connect it with a regular WooCommerce product?
No, you cannot. You either use Toolset User Forms with regular WooCommerce Products or add new users via WooCommerce Subscription.
Can I control the user’s membership or the role so I can set it to expire on a specific date that may be separate from the date they paid to be a member?
No, you cannot. You would need some additional plugins that control validity of user accounts based on the set expiration date.