How Role-Based Rules Work
Role-based rules let you show or hide prices based on the visitor’s WordPress user role. This is the most common use case for B2B and wholesale stores.
Common Role Configurations
Hide Prices from Guests (Not Logged In)
The most popular setup — require visitors to log in before seeing prices:
- Create a new rule
- Set User Roles to “Guest” (not logged in)
- Set Products to “All Products”
- Set Action to “Login Button” with text “Login to See Prices”
Hide Prices from Retail Customers
Show wholesale prices only to approved wholesale accounts:
- Create a rule targeting roles: Customer, Subscriber, Guest
- Set action to custom text: “Wholesale pricing available for approved accounts”
- Your wholesale role users will see normal prices
Exclude Admins from Rules
By default, rules apply to all roles including administrators. To exempt admins, add “Administrator” to the Exclude Roles field on each rule.
Custom Roles
Hide Price Pro detects all registered WordPress roles automatically, including custom roles created by plugins like Members, User Role Editor, or WooCommerce B2B plugins. They appear in the role dropdown alongside default WordPress roles.
Role Hierarchy
WordPress roles don’t have a built-in hierarchy. If a user has multiple roles (possible with some plugins), Hide Price Pro checks if any of their roles match the rule conditions.