How to set dynamic pricing rules in WooCommerce
WooCommerce handles basic sale prices and coupons, but conditional rules based on quantity, roles, categories or cart totals need a pricing extension or custom code. For most stores, use a rule-based plugin and test every rule in the cart before launch.
- 01Define the pricing rule
- 02Check the manual WooCommerce route
- 03Install a pricing extension
- 04Create and prioritise rules
- 05Set dates and stacking behaviour
- 06Test the complete buying journey
- 07Use the fast way for complex rules
What you need
- A WooCommerce store with products and prices already configured
- Administrator or shop manager access
- A test customer account for any role-based rules
- A staging site or maintenance window for testing pricing changes
Define the pricing rule
Write down exactly when the new price should apply, who should receive it and whether the discount changes the product price or the cart total. Common rules include quantity tiers, category discounts, wholesale roles, buy-one-get-one offers and discounts above a cart value. WooCommerce’s official Dynamic Pricing documentation supports these rule types through an extension.
Also decide whether rules should stack. For example, a wholesale customer might receive a role discount and a category promotion, or you may want only the larger discount to apply. Write the expected price for two or three test carts before configuring anything.
Check the manual WooCommerce route
WooCommerce core can handle a fixed regular price, a scheduled sale price and built-in percentage, fixed-cart or fixed-product coupons. Edit a product under Products, enter its regular or sale price, or create a coupon under Marketing > Coupons.
This manual route is fine for straightforward promotions, but it does not provide a general rule builder for conditions such as quantity tiers, customer roles or purchase history. Custom PHP can change prices, but it must account for product pages, archives, variations, cart recalculation, checkout and caching. WooCommerce describes hooks and filters as an advanced development task, so do not add price logic to a live theme unless you can maintain and test it.
Install a pricing extension
Install a WooCommerce-compatible dynamic pricing extension from Plugins > Add New or upload its ZIP file under Plugins > Add New > Upload Plugin. Activate it, then check whether it adds a pricing screen under WooCommerce or a pricing panel inside the product editor.
Before activating rules on a busy store, check the extension’s compatibility with your WooCommerce version, variable products, tax settings, coupons, memberships and the block-based cart or checkout. If the extension has separate settings for product, category, role and order-total pricing, use the screen that matches the condition you wrote down.
Create and prioritise rules
Start with one rule and save it before adding another. For a quantity discount, choose the product or category, set the quantity range, select a percentage, fixed amount or fixed unit price, and enter the discount. For role pricing, select the customer role and define whether the rule applies store-wide or only to selected products.
For variable products, decide whether quantities should be counted across all variations or separately for each variation. In the official WooCommerce Dynamic Pricing extension, product quantity counts variations together, while variation quantity counts each variation separately. Rules are checked in order, and a product rule can take priority over a role rule, so put the most specific rule first.
Set dates and stacking behaviour
Add start and end dates for temporary promotions rather than remembering to disable them manually. Confirm whether the rule applies to guests, logged-in customers, selected roles or everyone. If the rule is based on purchase history, verify how the extension identifies previous orders and whether guest orders can be matched reliably.
Check coupon behaviour as well. Dynamic pricing adjustments may be applied before coupons, meaning a customer could receive both discounts unless you restrict the coupon or disable stacking. The official extension documentation states that coupons apply on top of dynamic pricing by default.
Test the complete buying journey
Test the lowest quantity, every threshold, one quantity above each threshold and a quantity outside the rule. Test a guest, a normal customer and each eligible role. For variable products, add different variations in the same cart and confirm that the quantity calculation matches your plan.
Check the product page, shop page, cart, checkout, order confirmation and the final order in the dashboard. Change quantities and remove items to force recalculation. A common Friday-night failure is a correct-looking product page with a wrong cart or checkout total; WooCommerce also documents order validation errors when a dynamic pricing rule changes the price during checkout.
Use the fast way for complex rules
For rules based on user roles, purchase history, products, categories or promotions, use WooCommerce Smart Prices instead of building and maintaining custom price code. Configure the condition, select the products or customers it affects, set the adjustment and preview the result with test accounts and carts.
This is the practical route when standard sale prices and coupons are too limited. It also gives you a central place to manage bulk adjustments and promotional rules, but you should still test taxes, coupons, variable products, caching and checkout before enabling the rules for real customers.
Let WooCommerce Smart Prices do it
Condition-based pricing for roles, purchase history, products, and promotions when standard coupons are too limited.
Sources
- woocommerce.com /document/woocommerce-dynamic-pricing/?utm_source=openai
- woocommerce.com /document/managing-products/product-editor-settings/?utm_sou…
- woocommerce.com /document/introduction-to-hooks-actions-and-filters/?utm_sou…
- woocommerce.com /document/managing-orders/troubleshooting-orders/?utm_source…
Questions
- Does WooCommerce include dynamic pricing rules by default?
- No. WooCommerce includes regular prices, sale prices and core coupon types, but general conditional pricing based on quantity, roles, categories or cart totals requires an extension or custom development. Sale prices are suitable for simple product markdowns, while coupons are suitable for code-based promotions with restrictions.
- Can I set quantity-based pricing without a plugin?
- Not through the normal WooCommerce settings. You can enter a single sale price, but tiered prices require pricing logic that recalculates product or cart prices as quantities change. A developer can write that logic with WooCommerce hooks and filters, but it must be maintained across products, variations, cart updates and checkout.
- Why does the discounted price show in the cart but not on the product page?
- The rule may be calculated only after an item is added to the cart, especially when it depends on quantity or a cart total. Some pricing rules can display on the product page, but only when the extension can determine the qualifying condition before checkout. Check the extension settings, variation behaviour, caching and any custom product template before changing price code.
- Do dynamic pricing rules stack with WooCommerce coupons?
- Usually they can, unless you configure the pricing extension or coupon to prevent stacking. Test a cart with the dynamic rule and coupon together, because the final discount may be larger than intended. The official WooCommerce Dynamic Pricing documentation says coupons apply on top of pricing adjustments by default.
- What should I test before enabling a pricing rule?
- Test every threshold, customer type, product variation, date boundary and coupon combination in the cart and checkout. Confirm the order total, tax, shipping and recorded order line prices, not just the number shown on the product page. Also test quantity changes and item removal, because stale cart fragments, caching or checkout recalculation can expose incorrect totals.