Table of Contents
In order to use Profile Builder with WooCommerce you’ll need to have the following plugins installed and activated on your site:
Restricting Product Viewing allows you to easily create user-only products, as well as allow only certain roles to view certain products. This feature combined with restricting product purchases offers you a ton of flexibility when it comes to presenting products to your users.
Let’s say we have already created 3 custom roles: Student, Parent, and Teacher. You can create custom roles using the Roles Editor feature.
After we set up the custom roles we need to set up our WooCommerce Products visibility. In our case, we have 4 products: Hoodie, T-shirt, Belt, and Sunglasses which are added in 2 categories: Clothing and Accessories.
When you edit a product, you will notice a new meta box called Content Restriction. Under the Display Options section, you will be able to set up the restriction for product viewing.
Inside the Display Options section we can set the following options:
Notes
To display a product to all logged-in users, regardless of User Roles, you will need to check only the “Logged In Users” option.
View of the product page for Logged Out Users
This is how the logged-out user will see the product.
View of the product page for Logged In Users
This is how the logged-in user will see the product.
To display a product to all users that have a specific User Role you will need to check the “Logged In Users” option and also the User Role that the restriction will be based on.
Note – Checking multiple User Roles, for example, Student and Parent, will display the product to Student, Parent, or Student and Parent users.
View of the product page for Logged Out Users and without the Selected Role
This is how the logged-out user will see the product.
View of the product page for Logged In Users without the Selected Role
This is how the logged-in user who didn’t have the role that you have selected in content restriction will see the product.
View of the product page for Users with the Selected Role
This is how the logged in users that have the role you have selected in content restriction will see the product.
Besides product viewing, you can also restrict product purchasing. This way you can allow only certain roles to purchase specific products.
When you edit a product, you will notice a new meta box called Content Restriction. Under the Purchase Options section you will be able to setup the restriction for product purchasing.
Inside the Purchase Options section you can set the “Who can purchase?” option to:
Notes
To allow a product to be purchased only by the logged in users, regardless of Role, you will need to check only the “Logged In Users” option.
View of product page for Logged Out Users
This is how the logged out user will see the product.
View of product page for Logged In Users
This is how the logged in user will see the product.
To allow a product to be purchased by the users who have a specific Role you will need to check the “Logged In Users” option and also the role(s) that will be able to purchase this product. The remaining roles will be restricted from purchasing it.
View of product page for Logged Out Users and and without the Selected Role
This is how the logged out users or members without the Student Role will see the product.
View of product page for certain role
Gold Members will see the “Add to cart” button and will be able to purchase this product.
In order to restrict the access to the WooCommerce Shop page simply go to Pages -> All Pages, Edit the Shop page, and scroll down until you see the Content Restriction meta box.
Inside the Display Options section we can set the following options:
Notes
To display the Shop page only to logged in users, regardless of User Role, you will need to check only the “Logged In Users” option.
View of Shop page for Logged Out Users
This is how the logged out user will see the Shop page.
View of Shop page for Logged In Users
This is how the logged in user will see the Shop page.
To display the Shop page to all members that subscribed to the users who have a specific Role you will need to check the “Logged In Users” option and also the User Role that the restriction will be based on.
Note – Checking multiple User Roles, for example, Student and Parent, will display the product to Student, Parent, or Student and Parent users.
View of Shop page for Logged Out Users and without a Certain Role
This is how the logged out users or members without the Student Role will see the product.
View of Shop page for Members
Logged in, Student Role will be able to see the Shop page, without any restrictions.
As you noticed by now, using Profile Builder we can restrict the product viewing and also product purchasing. In the screenshot below, we restricted product viewing for the “Belt” product.
Shop page when a product viewing is restricted
You only see just the product title, without any details about price, description or thumbnail image. Also the “Add to cart” button is replaced by a “Read more” button.
Shop page when a product is visible, but purchase restricted
When a user role can view a product, but is not allowed to purchase it, he will be able to see all product details, just that the “Add to cart” button will be replaced with a “Read more” button. This way he won’t be able to purchase the product.
Combine the power of Profile Builder with Paid Member Subscriptions to set up user registration, memberships, and recurring revenue.
Get 25% off with the bundle