Features ↑ Back to top
Groups WooCommerce grants memberships based on products. It automatically assigns a customer to one or more groups based on the products ordered. Memberships can be sold through normal products where membership is granted for a given period or an unlimited time through one-time payments, or through subscriptions where the memberships lasts as long as the subscription is active, based on recurring payments and an optional setup fee.
If you want to charge a monthly subscription fee, the WooCommerce Subscriptions plugin is required, which adds a new subscription product type. Groups WooCommerce controls the memberships for the duration of the subscriptions. Groups provides the membership and access control capabilities to protect content.
Setup ↑ Back to top
The following outlines how to set up a Premium membership product. Additional unlimited memberships can be added in the same way.
Install and activate plugins ↑ Back to top
For subscriptions also install
Set up a Premium group ↑ Back to top
Below we are giving an example using a group named Premium and its associated capability premium. Note that you can use any group and capability name, we just use Premium here because it underlines a pretty common use case.
2.1 The Quick Way
This is the recommended way. It generates our Premium group on the fly while you create your protected content.
Go to Posts > Add New, give your new post a title and some content.
Now input Premium in the field provided under Access restrictions.
Next publish your post and the Access restrictions will show that this post is protected so that members of the Premium group only can view it.
2.2 Step by Step
If you have already created a protect post using the quick way above, you can skip this section and head on to 3. Set up a Premium Membership Product. Another example is provided under 4. Set up a page for “Tutorials” members only
Go to Groups > Capabilities and click New Capability. Enter premium in the Capability field and click Add.
Go to Groups > Groups and click New Group. Enter Premium in the Name field and choose the premium capability, create the group by clicking Add.
Go to Groups > Options and choose the premium capability under Access restrictions > Capabilities and click Save at the end of the page. You will now be able to protect your posts with the premium capability. Only members of the Premium group will have access to these.
Set up a Premium Membership Product
Go to Products > Add Product to create a new product:
Name the product Premium Membership or any name you find more suitable.
In the Product Type panel below the description:
- Select Simple product as the Product Type if you want to offer membership based on a one-time fee. If you have WooCommerce Subscriptions installed, you can select Subscription and sell Memberships with periodic payments and a setup fee.
- Check the Virtual box if this is not a tangible product, i.e. if you are just selling the membership, the product would be virtual. If you are setting up a tangible product which also grants access to restricted content, do not check the Virtual box.
In the Product Data panel:
– Set up the product price in the General tab.
– Click the Groups tab and check the box for Premium.
For a time-limited membership, specify a duration and select the appropriate time unit.
The time units Days, Weeks, Months and Years are used to restrict the membership according to the Duration indicated.
For example, to limit the membership to a 3 month period, indicate 3 under Duration and select Months as the Time unit.
Now click Publish to create your new membership product.
Set up a page for “Tutorials” members only
Go to Pages > Add New to create a new page:
In the Access restrictions tab enter Tutorials so that the Tutorials group and capabilitiy are created automatically and click Publish to create the page.
This page is now only accessible to members of the Premium group.
If you want to restrict access to a page based on an existing group, select it under Access restrictions.
Group Assignments ↑ Back to top
Automatic Assignments ↑ Back to top
Users are assigned to groups based on the products they purchase (and pay). Once the order that contains a product with group assignments is processing or completed*, the group membership of the user account corresponding to the customer is enabled.
- Whether the assignment is made on order processing or completed is determined by the setting under WooCommerce > Groups > Order Status.
The group membership related to a product purchased terminates when the duration of the time-limited membership ends. Refunded or canceled orders also terminate memberships.
If more than one product grants access to a membership, the user is not removed from the group even though one of the memberships ends.
Memberships without a duration defined for the product do not end.
Memberships can be modified through manual assignments.
Manual Assignments ↑ Back to top
Group memberships can be managed directly from the WordPress Dashboard through the Users menu. You can add multiple users to one or more groups here and also remove them. Users can also be added or removed from groups if the option is enabled under Groups > Options.
Time-limited memberships can be added and modified if the option is enabled under WooCommerce > Groups.
To add a user to a group, edit the user’s profile, choose the desired group and update the profile to save the changes.
After the user has been added to the group, extended membership editing options are available.
Unlimited memberships are identified as such (∞), as in the case above, there is no specific date indicated that would end the user’s membership.
Time-limited memberships show the date at which they will terminate. These can be converted into unlimited memberships using the ∞ button. The date of termination can be adjusted as desired.
Settings ↑ Back to top
Groups WooCommerce offers several settings that can be adjusted. Go to WooCommerce > Groups to review or adjust the current settings.
Order Status ↑ Back to top
This is relevant for products that add users to groups – users can be added as early as an order is processing or when an order is completed. The same applies to users being removed from groups. Note that this setting does not apply to subscriptions.
Subscription Status ↑ Back to top
This settings affects the way group memberships are handled when a subscription is put on hold or reactivated.
Durations ↑ Back to top
When enabled, shows information about durations along with product prices.
Force registration ↑ Back to top
When this option is enabled and a product that adds a user to a group is in the cart, the customer is required to log in or register to complete checkout. At checkout, the customer will be required to create an account or log in if she or he hasn’t done so already.
User Profiles ↑ Back to top
Show membership info in user profiles
If enabled, users can see information about their group memberships on the profile page.
Show membership info when editing user profiles
If enabled, users who can edit other users can see and modify group memberships.
Shortcodes ↑ Back to top
This shortcode renders group membership information for the current user. Each valid membership displays the group, for time-limited memberships, the date and time until the membership is valid is shown, too.
Example output for a user with one valid time-limited membership:
Premium membership until December 4, 2015 at 9:49 am.
By default, membership with the Registered group is not included. The shortcode can be customized using the following attributes.
exclude: A list of group names separated by comma. Membership information related to these groups is not shown. The Registered group is excluded by default.
show_count: Whether to render the number of valid memberships. Enabled by default, use “false” to disable.
count_0: When showing the number of membership, the message to render for 0 valid memberships.
count_1: The message to render for one valid membership.
count_n: The message shown for two or more valid memberships. The placeholder
%dis used to display the number of valid memberships,
Example – to display the valid memberships for the current user omitting the count:
This shortcode can be used to list a user’s subscriptions and related group memberships.
To use this shortcode, the WooCommerce Subscriptions extension is required. It will not render any output if the extension is missing.
status: Subscription status, defaults to active. Can be a comma-separated list containing any of active, on-hold, cancelled, trash, deleted. Use * for all subscriptions.
user_id: Defaults to the current user’s id, accepts user id, email or login.
show_count: If info about how many subscriptions are listed should be shown. Defaults to “true”.
count_0: Message for 0 subscriptions listed.
count_1: Message for 1 subscription listed.
count_2: Message for n subscriptions listed, use %d as placeholder in a customized message.
show_table: If the table should be shown. Defaults to “true”.
columns: Which columns should be included. Defaults to all columns. Specify one or more of status, title, start_date, expiry_date, end_date, trial_expiry_date, groups or order_id.
Display a list of all of the user’s subscriptions, showing the subscription title, start date, status and groups in that order:
[groups_woocommerce_subscriptions_table columns="title,start_date,status,groups" status="*"]
FAQ ↑ Back to top
Why isn’t the user removed from a group when a subscription is cancelled? ↑ Back to top
When a subscription is cancelled it does not imply that the user should automatically be removed from a group. The user should remain in the group during the time covered by the last payment.
Example: I sign up and pay $15 for a month premium membership, right after that I cancel my subscription. I have still paid for a full month and should have premium access during that time. Once the month is over, my premium membership will end automatically.
Note that this applies when Groups WooCommerce is used together with WooCommerce Subscriptions. If only Groups WooCommerce is used and time-limited memberships are sold, these are synchronized with the order status directly, i.e. when an order with a time-limited membership is cancelled or refunded, the membership ends immediately.
Questions & Support ↑ Back to top
Have a question before you buy? Please fill out this pre-sales form.
Already purchased and need some assistance? Get in touch the developer via the Help Desk.