Rules by User Role

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:

  1. Create a new rule
  2. Set User Roles to “Guest” (not logged in)
  3. Set Products to “All Products”
  4. Set Action to “Login Button” with text “Login to See Prices”

Hide Prices from Retail Customers

Show wholesale prices only to approved wholesale accounts:

  1. Create a rule targeting roles: Customer, Subscriber, Guest
  2. Set action to custom text: “Wholesale pricing available for approved accounts”
  3. 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.

Was this article helpful?