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.
- 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.
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.
- 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.
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.
The only exception would the following case:
- Membership role-1 – renewable subscription
- Membership role-2 – lifetime subscription
To handle the second case with a lifetime subscription you shouldn’t use the WooCommerce Subscription plugin. Instead, use Toolset to create a User Form connected to a regular WooCommerce product.
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.
- Assigning Templates to Posts Conditionally
- How to Display WooCommerce Orders on the Front-end
- Using WooCommerce Fields in Product Forms
- Adding Toolset Blocks to the WooCommerce My Account Page
- Selecting WooCommerce Blocks Output Type
- Show all related topics...
- Creating a Custom List of WooCommerce Products for a Taxonomy
- Building a Custom WooCommerce Shop Page
- Creating a Page with a Custom WooCommerce Product Search
- Creating a Custom List of Related WooCommerce Products
- Creating Custom Templates for WooCommerce Products
- Adding a Custom Taxonomy to WooCommerce Products
- Creating a Custom WooCommerce Product Slider
- Adding Custom Fields to WooCommerce products
- Creating Front-end Forms for Adding WooCommerce Products
- Charge users for registering premium accounts
- Charge users for submitting content
- Custom WooCommerce Roles and Admin Capabilities