This guide walks you through installing, activating, and using the Hide Variations by User Roles plugin for WooCommerce.
Installation
- Download the Plugin: Head over to the www.additions.store/shop and download the .zip file for the Hide Variations and Prices by User Roles plugin.
- Upload and Activate: Go to your WordPress admin panel. Go to Plugins > Add New. Click Upload Plugin and select the downloaded file. Once uploaded, click Install Now and then Activate.
Activation
After activating the plugin, go to the WP Admin Panel > Products > All Products. Find the variable product and click on the product for which you wish to enable hide variation and prices.
Selecting Restriction Type
- Expand Variations: In the Product Edit Sheet, find the Variations section. Click the Expand button to reveal detailed settings for each variation. (SAME CASE WITH PRICES)
- Look for the Variation Control for User Roles section. Here, you can choose three settings:
Selecting Restriction Type:
Pick how you want to restrict variations for user roles. You have three options:
Completely Hide: Specific variations are entirely hidden from the chosen user roles.
Disable: Users in chosen roles will see the hidden variations but won’t be able to select or add them to their cart.
Default: If you’ve hidden or disabled product variations based on user roles, but later you want to revert these changes and restore the default behavior, you can use this restriction type.
Select User Roles:
Choose the user roles you want to apply these restrictions to:
- Administrator
- Editor
- Author
- Contributor
- Subscriber
- Customer
- Shop manager
- Wholesale
- B2B
- Retailer
- Guest
How-To Guides
Hiding Individual Product Prices and Variations Based on User Roles
Product Settings
- Go to Products > All Products and select the product for which you want to implement restrictions.
- In the product edit screen, find the Variations section and click Expand for detailed settings.
- Choose the restriction type.
- Select user role.
- Save Changes.
Hiding or Disabling Entire Product Variations
Here’s how to hide or make entire product variations unselectable:
- In the Product Edit Sheet, go to the Variations section.
- Click the Expand button to access detailed settings for each variation.
- Choose Restriction Type:
- Unselectable
- Completely Hide
- Save Changes
Reverting to Default Settings
This is especially useful when you want the product variations to behave as they would without any user-role-based restrictions.
- Go to Products > All Products in your WordPress Admin Panel.
- Select the desired product and go to the Variations section.
- Click Expand to access the detailed settings for each variation.
- In the Variation Control for User Roles section:
- Choose the Default restriction type for the variations you want to reset.
- Save your changes.
Use Case Example:
Suppose you’ve restricted a variation for guest users, making it completely hidden. However, you later decide to make the variation visible and purchasable for all user roles. By selecting the Default setting, you can quickly revert to the original functionality without needing to manually remove restrictions.