Discounts by customer role with Dynamic Pricing

This recipe gives each customer level its own discount with Dynamic Pricing: 10% off for Silver members and 20% off for Gold members, set on one screen. The cart totals below were measured on a real cart.

The discount follows the WordPress user role. A customer sees their price after logging in: in the shop, on the product page and in the cart. Guests and other customers see the regular price.

What you need

↑ Back to top
  • Dynamic Pricing, activated
  • A user role for each customer level. Any role works, including one a membership plugin created.
  • A customer in each role, so you can check the result

Set up the discounts

↑ Back to top
  1. Go to WooCommerce › Dynamic Pricing and choose Add rule on the Rules tab.
  2. Choose Role Pricing. The table lists every user role in your store.
  3. Tick Silver, leave Type on Percentage discount and enter 10 in Amount.
  4. Tick Gold and enter 20.
  5. Choose Save pricing.

The Rules tab now shows a Role Pricing group with one rule per role, such as 20% off · All products · Role: Gold. To change an amount later, open the group’s menu and choose Edit as table.

What each column does

↑ Back to top
ColumnWhat it does
OnTicked, the role’s discount applies. Cleared, the discount is kept and switched off.
RoleThe WordPress user role.
TypePercentage discount takes a percentage off. Price discount takes an amount off each item.
AmountA number, such as 20.

What the customer is charged

↑ Back to top

Measured on a cart with a $100 jacket and two $20 mugs, $140.00 at regular prices:

Signed in asJacketMugCart total
Guest$100.00$20.00$140.00
Customer$100.00$20.00$140.00
Silver$90.00$18.00$126.00
Gold$80.00$16.00$112.00
Silver and Gold$80.00$16.00$112.00

A customer with two roles gets the larger discount. A customer in Silver and Gold pays the Gold price.

Variations on the same setup

↑ Back to top
You wantChange
An amount off each itemSet Type to Price discount, amount 5 for $5 off.
A role discount on one categoryChoose Add rule, then Simple. Set Kind to Simple discount, pick the category under Categories and choose the role under Who.
A different trade price on selected productsSee Wholesale pricing by role.
Pause one level’s discountOpen Edit as table and clear its tick. The amount stays for next time.

The Dynamic Pricing documentation shows how rules work together.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.