1. Home
  2. Knowledge Base
  3. WooCommerce Fees and Discounts
  4. Getting Started
  5. How to create a dynamic pricing rule
  1. Home
  2. Knowledge Base
  3. WooCommerce Fees and Discounts
  4. Dynamic Pricing
  5. How to create a dynamic pricing rule
  1. Home
  2. Knowledge Base
  3. WooCommerce Fees and Discounts
  4. How to create a dynamic pricing rule

How to create a dynamic pricing rule

To create a pricing rule, go to WooCommerce > Settings > Fees and Discounts and ensure that the ‘Enable Dynamic Pricing’ checkbox is selected.

After you’ve saved your settings, go to WooCommerce > Fees and Discounts to add your rules.

Click ‘Add New’ to add a pricing rule.

WooCommerce dynamic rule settings

Offer type

The ‘Rule’’ setting determines the type of pricing rule you’ll create. Choose from:

  • Buy X Get X – use this setting if you want to create offers like buy one get one free and the product purchased is the same as the product discounted.
    Example: Buy two apples, get one apple free
  • Buy X Get Y – this is a broader setting than Buy X Get X, also allowing you to create a buy one get one free type offer, but where the product purchased can be different from the product discounted
    Example: Buy two apples, get a banana half price
  • Bulk Pricing – this allows you to create tiers where the price changes according to the quantity of product selected.
    Example: Get 10% off when you buy 5 or more items
  • Order Total – this allows you to create tiers where the overall cart total changes based on its current value.
    Example: Buy $200 and get a 10% discount
  • Discount on Spend – this allows you to offer discounts based on the amount of spend on a specific item, specific categories or on all items.
    Example: Get $100 off, after spending $1000 on specific items

Label

You can add some optional text to the price label to advertise your offer – e.g. ‘Buy one get one half price’.

Schedule

Schedule settings

It’s possible to set a status for the rule – either Active, Paused or Scheduled

  • Active – to activate the rule on the front end
  • Paused – to stop the rule on the front end (but keep your settings, ready to be re-activated at a later date)
  • Scheduled – to start and stop the rule at times you specify.

Applies To Settings

Applies to settings

Applies to

Use this setting to determine which products the offer will apply to. Choose from:

  • All items – all items in the store will be eligible for the offer
  • Specific categories – this will open a new field where you can select which categories are eligible for the offer
  • Specific products – this will open a new field where you can select which products are eligible for the offer

Count by

The ‘Count by’ setting defines how to count items to trigger the offer. Choose from:

  • All – if you select ‘All’ here, then all items in the cart will be totalled
  • Product – if you select ‘Product’, the plugin will check totals on a product by product basis

Example: in a buy three, get one free offer, the customer has four different items in their cart – one banana, one apple, one peach and one pear. If the ‘Count by’ setting is set to ‘All’, then they qualify for the offer (because they have more than three items in their cart). However, if the ‘Count by’ setting is set to ‘Product’, they don’t qualify for the offer because they don’t have any products in a quantity of three or greater.

Role settings

Role-based discount settings

If you’d like to apply the rule to a specific role, then you can define the roles here.

Buy and Get Settings

This section will display if you have chosen Buy X Get X or Buy Y Get Y as the rule type.

Buy

Enter how many items the customer needs to purchase to trigger the offer.

Get

Enter how many items will be discounted when the offer is triggered.

Max items

The maximum number of items that are eligible for the offer. If you want to limit the number of discounted products, enter the number here. Set to 0 to allow an unlimited number of items to qualify for the offer.

Amount Settings

This section will display if you have chosen Buy X Get X or Buy Y Get Y as the rule type.

Discount amount settings

Adjustment type

The ‘Adjustment type’ setting defines the type of adjustment. Choose from:

  • Fixed discount
  • Percentage discount
  • Fixed fee
  • Percentage fee

Amount

Once you’ve chosen your adjustment type, enter the value of the adjustment here. Depending on whether you have chosen a fixed or percentage adjustment, the ‘Amount’ setting will either be a price value or a percentage.

Buy categories

If you choose ‘Specific categories’ under ‘Applies to’, you’ll see an extra field appear. ‘Buy categories’ allows you to define which product categories are eligible for the offer. Leave empty for all categories to be eligible.

Get categories

If you’ve chosen ‘Buy X Get Y’ in ‘Offer type’ and ‘Specific categories’ in ‘Applies to’, you’ll also see the ‘Get categories’ field. This allows you to define which categories the discounted items will be drawn from.

Buy products

If you choose ‘Specific products’ under ‘Applies to’, you’ll see an extra field appear. ‘Buy products’ allows you to define which products are eligible for the offer. Leave empty for all products to be eligible.

Get products

If you’ve chosen ‘Buy X Get Y’ in ‘Offer type’ and ‘Specific products’ in ‘Applies to’, you’ll also see the ‘Get products’ field. This allows you to define which products the discounted items will be drawn from.

Tiers

Create pricing rules according to the quantity of product in the cart

The ‘Adjustment’ setting defines the type of adjustment. Choose from:

  • Fixed discount
  • Percentage discount
  • Fixed fee
  • Percentage fee

Fixed Adjustments

This setting only applies to any rules with fixed values – i.e. fixed discount or fixed fees.

Choose whether to apply fixed adjustments to the combined items or per product – e.g. if there are 10 items that qualify for a fixed discount of $5, is the discount a flat rate of $5 (all) or 10 x $5 (per product)

More information

There’s a detailed blog post about setting dynamic pricing in WooCommerce here.

Was this article helpful?

Related Articles