WooCommerce Role Based Pricing
This documentation is for the Advanced Pricing for WooCommerce plugin.
With the Advanced Pricing for WooCommerce plugin you can easily setup role based pricing rules. Setting up role based pricing rules can be done for groups of products or single / specific products.
Setting up role based pricing in WooCommerce
Setting up Advanced Pricing for role based pricing is very easy. Using the 'User role' condition you have the option to select from any of the available user roles on your site. This includes any custom user roles that have been created.
Here's a simple example of how you can setup a pricing rule for the administrator user role.
Guest user pricing
In case you would like to target first-time orderers, or simply guest users you can target those by excluding all other user roles like so;
Update; as per version 1.2.1 of Advanced Pricing it is now possible to select 'Guest' as a option in the 'User role' condition, allowing you to more easily target guest users.
Setting up the role based pricing rules
After setting the conditions for which user role you'd like to target, you can continue setting up the pricing action.
There are multiple 'Action types' available. You can either setup a modified price - a simple way to modify the existing price - or a bulk pricing - allowing you to create a table for minimum/maximum quantities and their price accordingly.
It is possible to setup the pricing rules as a regular-price or sale-price for either action type, giving you full control.
The 'Price' field can have various values, these are the possibilities;
- Flat price ($10)
- Discount with flat rate (- $5)
- Discount percentage (-10%)
- Add percentage (+10%)
- Add flat rate (+ $10)
Creating user roles
WooCommerce by default comes with the 'customer' user role. If you're in need to add additional user roles such as 'wholesale' or 'retail' for example you can use a specialised plugin for user (role) management. My go-to plugin for this is the User Role Editor.
Important note for variable products
WooCommerce has build in price caching for variable products for performance reasons. This price caching by default does not take in account any user roles. To ensure prices are displayed correctly on variable products when you have user role based pricing setup, use this code snippet: https://gist.github.com/JeroenSormani/917d73577cdf64cfce1abd3e98b5c60c