Installation
Free version:
- Download the plugin from wp.org – https://wordpress.org/plugins/role-and-customer-based-pricing-for-woocommerce.
- Go to: WordPress Admin > Plugins > Add New and Upload Plugin. Choose file (for the file you downloaded in step 1).
- Install Now and Activate Plugin.
- Double-check if you have any other RBP plugins activated, if so – disable them to avoid conflicts.
Premium version:
- Download the Premium plugin from the email you received after purchase or visit https://users.freemius.com/login, and enter your credentials to access the buyer dashboard, where you can find the premium version of the plugin and license key.
- Before installing the Premium version of the plugin, please disable the Free version if you still run it.
- Go to: WordPress Admin > Plugins > Add New and Upload Plugin. Choose file (for the file you downloaded in step 1).
- Install Now and Activate Plugin.
- Double-check if you have any other RBP plugins activated, if so – disable them to avoid conflicts.
In case you see an error saying:
Fatal error: Cannot declare class ComposerAutoloaderInit00e8679be6824c83a88ea5e130babba2, because the name is already in use
Please double-check if you still have the Free version activated, deactivate it, and then try starting the Premium plugin once more.
Configuration
Role & Customer Based Pricing by Meow Crew allows you to configure pricing rules and set specific conditions for specific user groups and individual users.
Create Custom User Role
Role & Customer Based Pricing extends the User management tool allowing you to add and remove (non-standard) User roles.
Note: the plugin doesn’t allow you to manage default role capabilities, you can only replicate capabilities from existing user roles. If you need to create a role with custom capabilities, you should use another plugin. Any WP role created with another plugin can be used for role-based pricing rules.
To create a role, go to Users > Roles Management
Enter the role name and select the role capabilities that the newly-created role will inherit.
If creating a role that does not require any special capabilities (such as administrator, editor, contributor roles capabilities), you can choose Customer to apply the default capabilities.
Default and custom role capabilities are described in the provided table below.
You can delete any custom role from the list (WP default roles (administrator, editor, author, contributor, subscriber, customer, etc cannot be deleted).
Note: when you remove a role that is used in a pricing rule, the rule will remain active and apply the rule to all users until the rule is updated.
Next, you can then assign the user to the appropriate group under Users > All Users > {choose user account}.
Create General Pricing Rule
You can create role or customer-based pricing on two levels:
- General rule – apply rule to selected products group, entire categories with option to set general pricing and/or quantity rules.
- Product rule – apply rule to individual products.
To create general role-based or customer-based pricing and quantity rules, go to WooCommerce > Pricing rules.
In the Pricing rules table, you can view all of the created rules along with the status, applicable user role, discount value and min/max quantity.
The statuses include:
- Active – rule is operational
- Suspended – rule is paused (settings will remain)
- Deleted – rule is trashed (settings will be lost)
If you need to disable the rule temporarily, it’s better to suspend it, so all of the settings made before won’t be lost.
Note: the newest rules (at the top of the list) are prioritized over previous rules (at the bottom of the list). For example, if the same product or category is applied in two separate rules, the newer rule will override the previous one.
Even if a pricing rule is not set but a quantity rule is created, this will still be considered the main rule. Pricing and quantity conditions should be applied within the same rule.
Select users and products
To create a new role or customer-based pricing rule, click on the Add Pricing Rule button.
Complete the following fields:
- Rule Title – give the role-based pricing rule names to distinguish them from each other.
- Apply for categories – choose the categories for which this pricing rule will apply. The rule applies to all products in the category.
- Apply for specific products – if you don’t want to set pricing for the entire category or you need to add products in addition to the category, search for the product name here. No need to select products that are in the category you selected above.
- Include user roles – choose the user roles for which this rule will apply. It applies to all users with those roles. You can choose the newly-created ones as well as default WP user roles.
- Include specific customers – if the rule should apply only for certain customers, you can search for them in this field. If these users have the role specified above, no need to select them separately.
Determine price and quantity rules
After setting the relevant user roles and categories/products, you can set pricing and quantity rules (if applicable).
- Flat prices – set price to apply in rule.
- Regular price ($) – option to set a certain price (leave blank to default to standard product price)
- Sale price ($) – option to set sale price (leave blank to to default to sale product price)
Or
- Discount (%) – percentage discount. Note: if you have a sale price set for the product (available to everyone), discount will be calculated from that price.
Please note that you are changing prices for a whole range of products or categories listed above.
- Minimum quantity – set minimum amount of products that can be purchased by select user in a single order. If minimum allowed amount is 1, you can leave the field blank.
- Maximum quantity – set maximum amount of products that can be purchased by select user in a single order. If you don’t want to apply a limit, you can leave the field blank.
- Quantity step – option to set the quantity of product a customer can add to cart.
- The screenshot above demonstrates when the min. required amount of products is 2 (you cannot buy 1) and the max amount is set to 20 (so you cannot buy 21 items), with quantity step of 2 products at the time (so you can purchase 2, 4, 6…18, 20 items, but not 3, 5, 7…17, 19).
The plugin also displays error messages if the user’s cart does not meet the rule conditions.
Create Separate Pricing Rule for Products
In addition to creating general rules for various user groups (roles or separate users) and entire categories or product groups, you can set up role or customer-based pricing on individual products.
Note: pricing rules applied at the product level will override the general rule. For instance, if you have a general rule with a 20% discount applied to the entire clothing category but also have a product level rule with 10% off applied to the hoodie product, the 10% discount (not 20%) will apply to the hoodie product.
Simple Product
Simple, Variable, Grouped or Subscription products are configured identically. In the product metabox, you’ll find the the Role \ User pricing tab to set up Role and Customer-based pricing and quantity rules.
Role-based pricing
Here, you can configure role-based pricing for any user role in your store. Note: you can create only one rule per user role.
To set up role-based pricing, select the appropriate user role from the dropdown menu and click Setup for role.
Customer-based pricing:
Here, you can create pricing or quantity rules for separate user or user groups.
This feature allows you to create completely independent pricing for each product and every customer.
Fields here are the same as in the general rules section:
- Flat prices – set price to apply in rule.
- Regular price ($) – option to set a certain price (leave blank to default to standard product price)
- Sale price ($) – option to set sale price (leave blank to to default to sale product price)
Or
- Discount (%) – percentage discount. Note: if you have a sale price set for the product (available to everyone), discount will be calculated from that price.
Please note that you are changing prices for a whole range of products or categories listed above.
- Minimum quantity – set minimum amount of products that can be purchased by select user in a single order. If you minimum allowed amount is 1, you can leave the field blank.
- Maximum quantity – set maximum amount of products that can be purchased by select user in a single order. If you don’t want to apply a limit, you can leave the field blank.
- Quantity step – option to set the quantity of product a customer can add to cart.
- The screenshot above demonstrates when the min. required amount of products is 2 (you cannot buy 1) and the max amount is set to 20 (so you cannot buy 21 items), with quantity step of 2 products at the time (so you can purchase 2, 4, 6…18, 20 items, but not 3, 5, 7…17, 19).
Variable Product
Setting up role and customer-based pricing for Variable products is similar to setting up Simple products (above) however pricing and quantity rules are configurable for each variant independently. You have the option to set rules at the variation level by going to Product > Variations > Choose Variation > Role or Customer-based metabox.
If you don’t require specific pricing for each variation, you can simply set up a general rule to apply to all variations of the product.
Pricing Display and Rules for Non-logged In Users
Role and Customer-Based Pricing allows you to control the pricing display for non-logged in users. To configure, go to WooCommerce > Settings > Role\Customer Based Pricing.
Prevent purchase for non-logged in users – option to restrict purchases to registered users. If you enable this option, next will appear:
Error message when non-logged in users add to cart – Customize message to display to non-logged in users when they try to add a product into the cart.
Hide prices for non-logged in users – option to display or hide regular shop prices to non-logged in users.
Add-to-cart label for non-logged users – option to customize the Add-to-Cart button text for non-logged in users.
Pricing: Display as – when the percentage discount pricing type is used, this option allows you to display the discounted price (as a sale price or normal price) for specific roles.
Import and Export
The Role & Customer Based Pricing integrates with the default WooCommerce import/export plugin allowing you to bulk import and export role-based prices, customer-based prices, and quantity rules. Note: this feature works only for pricing rules on the product level. It is not possible to create general rules using the import feature.
In addition, the plugin is compatible with WP All Import to facilitate import and export of role-based pricing rules.
WooCommerce default export/import
When exporting using default WP export, we recommend you first create a role-based or customer-based pricing rules for applicable products. Next, go to Products > All Products > Export.
You can select the fields pertaining to role or customer-based pricing as well as quantity rules.
After exporting the relevant fields, you can then use as a template to import your prices and/or quantity rules. Don’t forget to export some product identifiers (post id, SKU, product title).
Your role-based pricing rules will display as shown below:
Name: indicates the role for which you’re creating the rule. If you have a few rules for different roles, use ‘;’ separator to specify rules for two or more roles. In the example above, you can see how to set up pricing type for two roles: ‘Wholesaler S tier:flat;Wholesaler B tier:flat’.
Role-based pricing type: (required field) indicates the type of role-based pricing you want to use for this product. Two options available:
- flat – manually set up regular and sale price
- percentage – percentage discount from the regular (or sale) product price.
Role-based discount: required when percentage discount pricing option is selected. You can enter any number here between 1 and 100, which matches the discount you want to assign for this role.
Role-based regular price: (optional field) if the product has a flat pricing option, then you need to indicate the regular price for the role here.
Role-based sale price: (optional field) if the product has a flat pricing option, then you may want to set sale price in addition to regular product role-based price.
Quantity rules: will display in the exported file as shown below (and surely, you can upload them in the same manner):
Simply input the role name and set quantity values to create quantity rules. You can set up all 3 options here: minimum and maximum quantities available for purchase and quantity step.
To import prices for customer-based rules (separate rules for each customer), you need to know the customer ID.
As the customer ID is not available on the user page, you can manually enter in the user ID displayed in the address bar on the Edit User page:
If needing to import in bulk, we recommend you either use the Reveal IDs plugin or export users w/ IDs via WP All Export or any other user export plugin you feel comfortable with.
WP All Import integration
Role and Customer Based Pricing is integrated with WP All Import allowing you to mass import role-based pricing rules for each product. You can only import pricing rules based on user role. If you need to import prices for each user separately, you will need to use the WooCommerce Import tool (instructions in the section above).
Also, note that the plugin isn’t integrated with WP All Export, so you cannot export role-based prices.
The first thing you need to do is create an appropriate file for import.
The following fields are required in the file:
- a product identifier in the file (product ID for example);
- role-based pricing type (should be ‘flat’ or ‘percentage) for each role and each product;
- for percentage discount pricing type, then enter the discount amount for each role and each product in the applicable fields
- if you use flat prices, then input the regular price for each role and each product;
- in case you need sale prices in addition to regular prices, create an additional column for sale prices for each role and fulfill it for each product with a ‘flat’ type (the regular role-based price should be set beforehand)
Your pricing section in the designated import file may look like this:
In the example, you can see an import file for 2 products and two roles (S-tier and B-tier). The first column is their ID, which you need to create\update WooCommerce products; the next 2 columns represent pricing type, you can mix them up and even use two different pricing types for one product, but for different user roles; the next 2 columns are assigned discount for those roles (you can leave cells blank if you don’t use percentage pricing type); the next 4 contain regular and sale prices for those products for each user role.
You can also include quantity rules in the file to import them along with pricing rules.
The quantity rules may look like this in your import file:
Column filling quantity rules are the same as for creating role-based pricing.
In that case, your quantity rules for the designated user role will be like this:
To import the file, go to All Import > New Import > Upload, then choose to create brand new products or update current ones and then select WooCommerce Products in the “Import to”.
Carefully check what fields to be uploaded from your file:
You can find an additional block named ‘Role and Customer based pricing’, where all of your user roles are available to choose from:
Next, you need to select the Role for which you wish to import role-based prices and quantity rules. You can drag and drop all the fields from your import file into the role setup. Example below:
Don’t forget to repeat the process for each role you wish to set up pricing and quantity rules for your WooCommerce products.
Read more detailed instructions on how to make product prices import here – How to import role-based product prices.
Tax Settings based on user role
The Role-Based Tax Settings are introduced in 1.6.0 version of the plugin, it provides WooCommerce store owners with enhanced flexibility to manage tax settings for each user role independently. By offering options for enabling/disabling taxes and controlling tax-inclusive/exclusive price displays, this feature adapts WooCommerce’s tax settings to meet the unique needs of different customer segments. This setup is ideal for stores with multiple user types, such as retail and wholesale customers, who may require distinct tax handling and pricing displays.
By default, WooCommerce offers a set of tax settings that apply universally across the store:
With the Role-Based Tax Settings feature, store administrators can now configure tax settings on a per-role basis. This extension allows different user roles to experience unique tax handling, providing greater flexibility for stores that serve diverse customer groups, such as resellers, wholesale buyers, or special user categories. Here’s how the plugin extends WooCommerce’s tax functionality:
To set up taxes for different user roles go to Settings > Role\Customer Based Pricing > Role-based tax settings section:
Here you can find the list with all of your user roles (even custom created).
1. Tax Enabling for User Roles
Each user role listed in the plugin settings panel has an option to configure whether taxes are applied. The choices are:
• Default WooCommerce Settings: The plugin will use the standard WooCommerce tax settings for this role.
• Enable: Taxes will be calculated and applied specifically for users with this role, even if the general WooCommerce settings have taxes disabled.
• Disable: Taxes will not be applied to users with this role, irrespective of the general WooCommerce tax settings.
This setting ensures that specific user groups, like resellers, can be exempt from taxes, or certain roles can have taxes applied even if the global settings do not.
2. Display Prices in the Shop
For each user role, administrators can customize how prices are displayed on product, category, and other shop pages. The options available are:
• Default WooCommerce Settings: The plugin defers to the WooCommerce default display settings for tax inclusion or exclusion.
• Excluding Tax: Prices displayed to users with this role will exclude tax, regardless of the global WooCommerce setting.
• Including Tax: Prices displayed to users with this role will include tax, ensuring consistency in presentation for certain user types.
This setting allows store owners to decide how prices appear to different user roles on the main shop pages, based on their tax requirements or pricing preferences.
3. Display Prices During Cart and Checkout
Similar to the shop page settings, administrators can define how prices are displayed during the checkout process for each role. The available options are:
• Default WooCommerce Settings: The plugin uses WooCommerce’s default configuration for showing prices with or without tax during checkout.
• Excluding Tax: Prices shown in the cart and checkout will exclude tax for users with this role.
• Including Tax: Prices shown in the cart and checkout will include tax, providing clear, tax-inclusive pricing at the final stages of purchase.
This level of control ensures a consistent experience for each user role, from browsing the store to completing a purchase, allowing different roles to see tailored tax-inclusive or tax-exclusive pricing.
Troubleshooting
If pricing fields don’t automatically update after making adjustments, it may be related to caching. To clear the product price cache, go to WooCommerce > Status > Tools > WooCommerce transients > Clear transients. That will clear out the product/shop transients cache.