WooCommerce Dynamic Pricing

WooCommerce Dynamic Pricing is a WooCommerce extension that applies pricing adjustments to products and carts: quantity discounts, tiered pricing, buy X get Y (BOGO) offers, wholesale and role-based pricing, and category and cart-total discounts. It is built for store developers and agencies configuring pricing for a client, and for wholesale (B2B) stores.

Can Dynamic Pricing do this?

↑ Back to top
QuestionAnswer
Quantity discounts and bulk discountsYes. Dynamic Pricing gives a product a lower unit price once the cart holds a set quantity, configured on the product’s Dynamic Pricing tab in Bulk mode.
Tiered pricingYes. Dynamic Pricing takes a table of quantity tiers per product, and every unit in the cart is priced at the tier the quantity reaches. Each tier is a percentage off, a flat amount off each unit, or a fixed unit price.
BOGO and buy X get YYes. Dynamic Pricing’s Special Offer mode gives the customer a set number of items free or discounted after buying a set number, once per order or repeating, on a product or across a category.
Wholesale and role-based pricingYes. Dynamic Pricing applies a discount for any WordPress user role, store-wide on the Role Pricing tab or on individual products, and shows logged-in customers in that role the adjusted price in the shop.
Category and brand discountsYes. Dynamic Pricing discounts every product in a category or brand, and can also discount by the quantity bought across a category.
Cart-total discountsYes. Dynamic Pricing takes a percentage off orders above an amount you set, for everyone, guests or specific roles.
Scheduled sale datesYes. In Dynamic Pricing, product rules, Advanced Category and Advanced Brand rules, and order-total rules take start and end dates.
Variable productsYes. Dynamic Pricing counts quantities across all variations of a product or per variation, and a rule can be limited to specific variations.
Discounted price on the product pageYes. Dynamic Pricing shows the adjusted price in the shop and on the product page for role, category and brand pricing, and for product tiers that start at a quantity of 1.
Other extensionsDynamic Pricing includes integrations for WooCommerce Memberships, Product Bundles, Product Add-ons, Groups and WooCommerce Brands, counts Gravity Forms Product Add-ons configurations one cart line at a time, and is declared compatible with the Cart and Checkout blocks and High-Performance Order Storage. See Dynamic Pricing compatibility for what each one does.
CouponsCoupons apply on top of Dynamic Pricing adjustments by default. A filter makes coupons set to exclude sale items skip adjusted lines.

The three most common setups follow, each with the cart totals to expect. The reference below covers every other setting.

Requirements

↑ Back to top
  • WordPress 6.5 or later
  • WooCommerce 9.0 or later
  • PHP 7.4 or later

Installation

↑ Back to top

To start using a product from WooCommerce.com, you can use the “Add to store” functionality on the order confirmation page or the My subscriptions section in your account.

  1. Navigate to My subscriptions.
  2. Find the Add to store button next to the product you’re planning to install.
  3. Follow the instructions on the screen, and the product will be automatically added to your store.

Alternative options and more information at:
Managing WooCommerce.com subscriptions.

Which screen do I need?

↑ Back to top
You wantWhere it is configured
Buy 2, get 1 free, or any buy X get Y offer on a productThe product’s Dynamic Pricing tab, Special Offer mode
Lower unit prices as quantity goes upThe product’s Dynamic Pricing tab, Bulk mode
A trade or wholesale price for a user roleWooCommerce > Dynamic Pricing > Role Pricing, or the product’s tab for one product
A percentage off orders above an amountWooCommerce > Dynamic Pricing > Order Totals Pricing
The same discount on a whole category or brandWooCommerce > Dynamic Pricing > Category Pricing or Brand Pricing

Quick start 1: Buy 2, get 1 free

↑ Back to top

The customer pays for two and receives a third free. The offer applies to each block of three items in the cart.

  1. Edit the product and open the Dynamic Pricing tab in the Product data panel.
  2. Click Add Pricing Group.
  3. Leave Applies To on Everyone and Quantities based on on Product Quantity.
  4. Set Rule Processing Mode to Special Offer, the mode for free and discounted items.
  5. Fill the row: Purchase 2, Receive 1, Type Percentage Discount, Amount 100, Repeating Yes.
  6. Click Update.

Measured on a $30 product with this rule:

In cartFull priceChargedFree items
2$60.00$60.000
3$90.00$60.001
6$180.00$120.002

The cart shows three items at $20 each: a cart line holds one price per item, so the discount is spread across the line. Set Repeating to No for one free item per order, or the amount to 50 for half price.

Full recipe, with every variation: Buy 2, get 1 free.

Quick start 2: Quantity pricing

↑ Back to top

The more a customer buys, the lower the unit price. When the cart reaches a tier, every unit in it gets that tier’s price.

  1. Edit the product and open the Dynamic Pricing tab.
  2. Click Add Pricing Group. Leave Applies To on Everyone, Quantities based on on Product Quantity and Rule Processing Mode on Bulk.
  3. Fill the first row: Minimum Quantity 5, Max Quantity 9, Type Percentage Discount, Amount 10.
  4. Click + to add a row: 10, 24, Percentage Discount, 20.
  5. Add a third: 25, *, Percentage Discount, 30. The * covers every higher quantity.
  6. Click Update.

Measured on a $100 product with these tiers:

In cartUnit priceCharged
4$100.00$400.00
5$90.00$450.00
10$80.00$800.00
25$70.00$1,750.00

Quantities 1 to 4 stay at the regular price.

Tiers on a variable product

↑ Back to top

On a variable product, the setting that decides the price is Quantities based on. Product Quantity adds up every variation of the product; Variation Quantity counts each variation on its own. To give the tiers to selected variations, set Product / Variations to Specific Variations.

Measured on a hoodie in sizes S, M and L, every size $100, with two rows: 5 to 9 at 10% off and 10 to * at 20% off.

In cartQuantities based onCharged
3 S + 2 LProduct Quantity$450.00, every unit at $90
3 S + 2 LVariation Quantity$500.00, each size below 5
5 S + 2 LVariation Quantity$650.00, S at $90 and L at $100
4 S + 3 M + 3 LProduct Quantity$800.00, every unit at $80
10 SVariation Quantity$800.00, every unit at $80

Use Product Quantity when the customer thinks of the order as “10 hoodies”, and Variation Quantity when each size or colour is priced as its own item.

Full recipe, including variable products: Tiered quantity discounts.

Quick start 3: Wholesale pricing by role

↑ Back to top

Customers in a user role, such as a wholesale role, see a lower price as soon as they log in: in the shop, on the product page and in the cart. Everyone else sees the regular price. Create the role first, with at least one customer in it to check the result.

  1. Go to WooCommerce > Dynamic Pricing and open the Role Pricing tab.
  2. Find the row for your wholesale role and tick Enabled.
  3. Set Type to Percentage Discount and Amount to 25.
  4. Click Save Changes.

Measured with this rule:

Signed in asRegular priceCharged
Retail customer$100.00$100.00
Wholesale customer$100.00$75.00
Wholesale customer$40.00$30.00

If the trade discount differs by product, use the product’s Dynamic Pricing tab: set Applies To to Specific Roles, pick the role, and add one Bulk row with Minimum Quantity 1 and Max Quantity *. Where a product has its own rule, that rule sets the product’s price.

Full recipe, including both routes side by side: Wholesale pricing by role.

How rules work together

↑ Back to top
  • Shop and product page prices. The shop and product page show the adjusted price next to the struck-through regular price for role, category and brand pricing, and for product tiers whose first tier starts at a quantity of 0 or 1. Quantity tiers and buy X get Y offers update the cart price as the customer adds items.
  • A product’s own rule takes priority over role pricing. A cart line priced by a product rule keeps that price.
  • Category and brand pricing combine with role pricing by default. Category Pricing applies first, then the role discount applies to the result. Developers can change whether rules stack with the woocommerce_dynamic_pricing_is_cumulative filter.
  • Order totals pricing applies last, to items at their regular price.
  • Within a product, pricing groups are checked top to bottom and the first one that matches is used.
  • Special offers discount the cheapest qualifying item first.
  • Coupons apply on top of pricing adjustments. See the FAQ to make “Exclude sale items” coupons skip adjusted lines.

Reference: product rules

↑ Back to top

Configured on the product, under Product data > Dynamic Pricing > Add Pricing Group. You can add several pricing groups to one product.

SettingWhat it does
Product / VariationsFor a variable product, apply the group to All Variations or to Specific Variations.
Applies ToEveryone, Guests, or Specific Roles to limit the rule to customers in the roles you select.
Quantities based onProduct Quantity counts every variation of the product together. Variation Quantity counts each variation separately. Cart Line Item Quantity counts each cart line separately, which suits products configured with Product Add-ons or Gravity Forms Product Add-ons. Quantity of Category counts items from the categories you select, so a product can be adjusted when enough items from a category are in the cart.
Rule Processing ModeBulk adjusts every unit once a quantity tier is reached. Special Offer adjusts a set number of units: buy X, get Y adjusted.
Dates: (Inclusive)Optional start and end dates, as YYYY-MM-DD. Leave blank to run the rule at all times.

Bulk rows

↑ Back to top
FieldWhat it does
Minimum QuantityThe quantity at which the row starts applying. When the first row starts at 0 or 1, its price is also shown in the shop and on the product page.
Max QuantityThe last quantity the row applies to. Use * to cover every higher quantity.
TypePrice Discount takes a flat amount off each unit, Percentage Discount takes a percentage off, and Fixed Price sets the unit price.
AmountA plain number, such as 25.

Special Offer rows

↑ Back to top
FieldWhat it does
PurchaseHow many items the customer pays for.
ReceiveHow many further items are adjusted.
TypePrice Discount, Percentage Discount or Fixed Price. Percentage Discount 100 makes the received items free.
AmountA plain number.
RepeatingYes applies the offer again for every further block. No applies it once per order.

Click + at the end of a row to add another, then click Update to save the product.

The product's Dynamic Pricing tab in Bulk mode with three rows: 5 to 9 at 10% off, 10 to 24 at 20% off, and 25 or more at 30% off

Reference: order totals pricing

↑ Back to top

Go to WooCommerce > Dynamic Pricing > Order Totals Pricing and click Add Pricing Group. You can add more than one group, for example one for a role and one for everyone else.

SettingWhat it does
Admin TitleA name for the group, for store managers.
Quantities based onCart Total uses the whole cart. Category Total uses items from the categories you select, and lets you choose which categories are adjusted.
Applies ToEveryone, Guests, or Specific Roles.
DatesOptional start and end dates.
Minimum / Max Order TotalThe range of cart totals the row applies to. Use * to cover every higher total.
Type and AmountA percentage. Enter 10 for 10% off.

For 10% off orders of $100 or more: Cart Total, Everyone, Minimum 100, Max *, amount 10. Click Save Changes.

The Order Totals Pricing screen with a group giving 10% off carts of 100 or more, applied to everyone

Reference: role pricing

↑ Back to top

Go to WooCommerce > Dynamic Pricing > Role Pricing. Every role on the store is listed. Tick Enabled for a role, choose Price Discount or Percentage Discount, enter the amount as a number, and click Save Changes. The discount applies to every product at every quantity.

To create roles of your own, use a plugin such as User Role Editor. If the Groups plugin is active, a Group Pricing tab works the same way for groups.

The Role Pricing screen with the Wholesale role enabled at a 25% percentage discount

Reference: category and brand pricing

↑ Back to top

Category Pricing

↑ Back to top

Go to WooCommerce > Dynamic Pricing > Category Pricing. Every product category is listed. Tick Enabled, choose Price Discount or Percentage Discount, enter the amount and click Save Changes. Adjusted products show in the shop with the regular price struck through. If a product is in two discounted categories, the larger discount applies.

The Category Pricing screen with the Clearance category enabled at a 20% percentage discount

Advanced Category Pricing

↑ Back to top

Quantity rules across a category, under the Advanced Category Pricing view of the same tab. Click Add Category Pricing.

SettingWhat it does
Admin TitleA name for the rule, for store managers.
Quantities based onSum of Category adds up every item from the selected categories. Sum of Category Per Product counts each product separately. Cart Line Item Quantity counts each cart line separately.
CategoriesItems from any of these categories count toward the quantity.
Categories to apply adjustment toWhich categories are adjusted. These can differ from the counted ones, for example buy any 2 from Menswear and get 10% off Children’s.
Applies To, Rule Processing Mode, DatesAs for product rules. Bulk and Special Offer rows take the same fields as on the product, with a minimum quantity of at least 1.
The Advanced Category Pricing screen with a rule counting Menswear items and giving 10% off Children's items from 2 units

Brand Pricing

↑ Back to top

When WooCommerce Brands is in use, Brand Pricing and Advanced Brand Pricing work like the category screens, keyed on product_brand. Developers can add pricing screens for other product taxonomies with the wc_dynamic_pricing_get_discount_taxonomies filter.

Entering amounts

↑ Back to top
  • Enter plain numbers: 25 for 25% or $25.
  • Write large numbers as digits: 1000.
  • If your store’s decimal separator is a comma, use a comma for decimal amounts.

FAQ

↑ Back to top

Which prices show on the product page?

↑ Back to top

The product page shows the adjusted price next to the struck-through regular price for role, category and brand pricing. A product whose first tier starts at a quantity of 0 or 1 shows that tier’s price. Quantity tiers and buy X get Y offers update the cart price as the customer adds items.

A WooCommerce cart with three caps, unit price reduced from 50 to 45, a 15 saving and a total of 135

Do coupons apply on top of Dynamic Pricing?

↑ Back to top

Yes, coupons apply on top of pricing adjustments. To make coupons with Exclude sale items ticked skip lines that Dynamic Pricing has adjusted, add this to your theme’s functions.php or a code snippets plugin:

add_filter( 'wc_dynamic_pricing_check_coupons', '__return_true' );

Can I leave sale items out of pricing adjustments?

↑ Back to top

For product rules and Advanced Category Pricing, yes. The woocommerce_dynamic_pricing_process_product_discounts filter receives the product, and returning false for it leaves that cart line at its own price.

Which item is free in a buy X get Y offer?

↑ Back to top

The cheapest qualifying item in the cart.

How do rules work with Product Bundles?

↑ Back to top

It depends on the bundle’s pricing. A bundle with its own price is treated as one product. If bundled items are priced individually, rules apply to each item, so a bundle of 2 games and 2 books counts as 4 items for a product quantity rule.

Bundle priced as one product
Bundle with items priced individually

How do pricing adjustments work with orders edited in the admin?

↑ Back to top

Pricing adjustments apply in the cart and at checkout. For an order you edit by hand in the admin, set its totals on the order screen.

Why do administrators see every role discount?

↑ Back to top

On multisite, a network administrator counts as every role, so every role rule applies to them. Test role pricing with a customer account in that role.

Can I round to more decimal places?

↑ Back to top

Dynamic Pricing rounds to your WooCommerce decimal setting. To calculate with four decimal places:

add_filter( 'woocommerce_dynamic_pricing_get_decimals', function () { return 4; } );

Prices display at your store’s decimal setting.

I see an array of data under each cart item

↑ Back to top

That is debug output from WP_DEBUG. Set WP_DEBUG to false in wp-config.php on a live store. See Debugging in WordPress.

Questions and support

↑ Back to top

Have a question before you buy? Please fill out the pre-sales form.

Already purchased and need help? Open a ticket with the developer. Support tickets are answered by the Dynamic Pricing developer, as described in the WooCommerce.com Support Policy.

Related Products

Advanced, flexible shipping. Define multiple shipping rates based on location, price, weight, shipping class...

Use conditional logic to restrict the shipping and payment options available on your store.

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.