safe Safe & Secure online payment

User Documentation: Conditional discount for WooCommerce

Introduction

Conditional Discount Rules apply a cart discount when cart conditions match.

Use it to give a fixed amount off, a percentage off, a free or discounted product, or a future coupon for the next order.

Discount applies on cart and checkout. Applied discount shows with the rule title.

Getting Started

Step 1: Open the Settings

  1. Open WordPress admin.
  2. Open Conditional Discount.
  3. Open Discount rules.
  4. Select Add discount rule.
  5. To edit, select the rule title in the list, or use the edit button.

The rules list shows columns: ID, Discount, Amount, Status, Priority, Usage/Limit, Actions.

Step 2: Configure the Feature

Fill Step 1: Basic Settings, then Step 2: When to apply this discount.

Step 3: Other settings, Step 4: Discount message, and Step 5: Apply calculated discount to selected products are optional.

The following are checked on save:

  • Discount rule title cannot be empty.
  • At least one Selection Rules row is required.
  • Discount priority must be an integer.
  • Discount start date cannot be after Discount end date.
  • Future coupon type requires a selected Coupon template.

Step 3: Save the Settings

Select Save Discount Rule.

After save, editing the same rule stays on the edit page. New rules redirect to the edit page for the new rule ID.

Quick Start

To give 10 off when cart subtotal is at least 100:

  1. Create a rule under Conditional Discount > Discount rules > Add discount rule.
  2. Enter Discount rule title: Large cart discount.
  3. Select Discount type: Fixed.
  4. Enter Discount amount: 10.
  5. In Step 2: When to apply this discount, select All the below rules should match.
  6. Add Selection Rule: Cart Subtotal (Before Discount) / Greater or Equal to (>=) / 100.
  7. Select Save Discount Rule.

Result: cart with subtotal 120 gets 10 off. Cart with subtotal 90 gets no discount.

Plugin Features

  • Fixed amount off cart.
  • Percentage off cart or selected products.
  • Free or discounted product added to cart.
  • Future coupon for next order.
  • Cart, product, customer, location, shipping, payment, order history, and delivery conditions.
  • All-match or any-match condition logic.
  • Priority and exclusive rules.
  • Total and per-user usage limits.
  • Control over other plugin discounts and WooCommerce coupons.
  • Offer messages before and after customer qualifies.
  • Apply calculated discount to selected products or categories.
  • Validity dates and translated discount names.

Plugin Settings

Status

Enables or disables the rule.

Disabled rules never apply. Default is enabled.

Discount priority

Controls evaluation order.

What to enter: an integer. Rules are evaluated highest number first. Default is 1.

Example: enter 10 for a VIP rule to evaluate it before rules with priority 1.

If a matched rule has Remove Other discounts (added by this plugin) selected, only that rule applies.

Discount rule title

Name shown to customers as the discount label.

What to enter: required short name, for example Large cart discount or VIP discount. Also used in admin order coupon list with a link back to the rule.

Add discount name translation (only useful for a multi-language site)

Optional translated titles per language.

Select Add name translation, enter title and language. Use Delete to remove a row.

Discount type

Select the kind of discount:

  • Fixed: fixed amount off current cart.
  • Percentage: percentage off current cart or selected products.
  • Future coupon: does not discount current cart. It creates a coupon after order, from selected coupon template.
  • Product: adds configured products to cart at reduced price.

Default is Fixed.

Calculate discount percent based on

Only used for Percentage type.

  • Cart total: percentage of cart total.
  • Total of Products selected by this rule: uses total of cart products matched by product-based selection rules in same discount rule.

Discount amount

Fixed amount or percentage number, depending on Discount type.

What to enter: required number. Supports math and shortcodes: [selected_product_qty], [qty], [selected_product_weight].

Supported shortcode attributes:

  • [qty]: max_qty, max_product_qty, excluded_products
  • [selected_product_qty]: max_qty, max_product_qty, excluded_products
  • [selected_product_weight]: max_weight, max_product_weight, excluded_products

Example: [selected_product_qty max_qty="2" max_product_qty="4" excluded_products="65,23"]

Coupon template

Only used for Future coupon type.

What to select: an existing coupon template. If none exists, create one under Coupon templates first.

Max discount

Caps calculated discount amount.

If calculated amount is greater than Max discount, discount becomes Max discount. Leave empty for no cap.

Example: 10% off with Max discount 25 on a 500 cart calculates 50, capped to 25.

Product discount

Only used for Product type.

Select Add Product, then for each row set:

  • Product search field: only simple products are searchable.
  • Quantity: quantity added to cart.
  • Discount type per product:
    • No Discount
    • Change Price
    • Percentage discount
    • Fixed Price Discount
  • Discount Amount: meaning depends on selected per-product discount type.
  • Remove: removes the row.

Added products get locked quantity in cart and mini-cart. If discount stops applying, added products are removed from cart.

Discount validity period

Start date and End date, format Y/m/d.

Empty start means already started. Empty end means never ends. Outside the period the discount does not apply and the offer message does not show.

When to Apply This Discount

Add one or more Selection Rules rows in Step 2: When to apply this discount.

Top selector:

  • All the below rules should match: every row must match.
  • Any one of the below rule should match: one matching row is enough.

Default is All the below rules should match.

Each row has condition, logic, and value. Select Add Rule to add a row. Rows with empty values are ignored during evaluation.

Location Related

  • Country
  • Postcode
  • State
  • Zones

Product Related

  • Cart has Product
  • Cart has product of category
  • Cart has Product tag
  • Cart has Variable Product
  • Product quantity

Cart Related

  • Cart Subtotal (Before Discount)
  • Coupon
  • Coupon initial
  • Day of week
  • Payment Methods
  • Quantity
  • Quantity of product from Tag
  • Quantity of product from category
  • Shipping Class
  • Weight
  • Max Product Height
  • Max Product Length
  • Max Product Width

User Related

  • User
  • User Role

Shipping Method

  • Shipping method
  • Local pickup shipping method

Delivery Date Time Plugin Dependent Rules

  • Delivery type (Delivery/Pickup/Dining)
  • Delivery/Pickup withing next n days
  • Pickup location
  • Selected delivery date
  • Selected delivery day

Purchase History

  • Customer order count
  • First Order
  • Last Order Total
  • Number of Orders during a period
  • Total amount spend during a period
  • Purchasing the same product again

Condition Logic

Cart Subtotal (Before Discount) and Quantity support:

  • Equal to ( = )
  • Less or Equal to ( <= )
  • Less than ( < )
  • Greater or Equal to ( >= )
  • Greater than ( > )
  • Not Equal to ( != )

Quantity also has Multiple off (*): true when cart quantity is an exact multiple of the entered value.

Coupon supports Equal to (=) and Not Equal to (!=). Compares selected WooCommerce coupons against coupons applied to cart.

Cart has Product supports:

  • Equal to (=): true if any selected product is in cart.
  • Not Equal to (!=): true if none of the selected products are in cart.
  • Must not have all the selected products
  • Only have this products in cart
  • Must have all the selected products
  • Exactly this products are in cart

Other conditions have their own logic dropdowns. Use the logic shown in admin for that condition.

Other Settings

Usage limit of this discount

Total number of times the discount can be used across all orders.

Empty means unlimited. Count increases when an order with the discount reaches pending, processing, on-hold, or completed. Count decreases when such order is cancelled.

When the limit is reached, the discount stops applying. At checkout validation an error Discount {name} usage limit has been reached. can appear.

Usage limit per user

Number of times one user can use the discount.

Empty means unlimited. Logged-in users are tracked by user ID. Guests are tracked by billing email at checkout validation.

Note: guest per-user limit is enforced at checkout validation, not while the cart discount is first displayed.

What happens to other discount offers when this offer is active

Option:

  • Remove Other discounts (added by this plugin)

When a matched rule has this selected, only that rule applies. Other matched plugin discounts are removed.

Leave as Select an option to allow multiple plugin discounts together.

WooCommerce coupons

Option:

  • Don't allow WC coupons when this discount is applied

When a matched rule has this selected, non-plugin WooCommerce coupons are removed from cart and a Coupon can't be applied error notice is shown.

Leave as Select an option to allow normal WooCommerce coupons together with this discount.

Discount Message

Optional customer-facing offer messages in Step 4: Discount message.

Options:

  • Show offer message: switch enables both messages below.
  • Message show before customer qualifies for the offer
  • Message show after customer qualifies for the offer
  • Display location: controls on which pages the message can appear.
  • Display condition used for before discount message: controls when the before-message appears.
  • Before-message logic: All the below rules should match or Any one of the below rule should match.

Display locations:

  • Product page
  • Categories page
  • WooCommerce page: values Product pages, Category pages, Shop page, Cart page, Checkout page, My account page.

Multiple display location rows use OR logic. If no location matches, no message shows.

Display conditions for before-message:

  • Subtotal Before Discount
  • Cart has Product
  • User role
  • Quantity

If no display condition rows exist, the before-message eligibility defaults to true, subject to location, date, and enable switch.

Behavior:

  • After-message shows when the discount is applied to cart.
  • Before-message shows when discount is not applied, location matches, display conditions match, validity dates match, and message is enabled.
  • Empty message text still creates a blank notice placeholder.

Message colors are set under Extra settings with Background color of message, Text color of message, Background color of message when discount applied message is shown, Text color of message when discount is applied message is shown.

Apply Calculated Discount to Selected Products

Optional restriction of where the calculated discount goes in Step 5: Apply calculated discount to selected products.

Fields:

  • Select categories whose products will receive the discount
  • Select products to which the discount will be applied

Leave both empty to apply to all products.

Behavior when set:

  • Fixed discount becomes a per-product fixed discount split across matched quantity. Total is divided by quantity of matched products.
  • Percentage with Total of Products selected by this rule applies only to matched products.
  • Variation IDs and parent product IDs are both considered when matching.

Examples

Example 1: Fixed discount on large carts

Goal: give 10 off when cart subtotal is at least 100.

OptionValue
Discount rule titleLarge cart discount
Discount typeFixed
Discount amount10
Selection Rules logicAll the below rules should match
Selection RulesCart Subtotal (Before Discount) / Greater or Equal to (>=) / 100

Result: cart with displayed subtotal 120 gets 10 off. Cart with subtotal 90 gets no discount.

Example 2: Percentage discount with cap

Goal: give 10% off, never more than 25.

OptionValue
Discount typePercentage
Calculate discount percent based onCart total
Discount amount10
Max discount25
Selection RulesQuantity / Greater or Equal to (>=) / 2

Result: cart total 500 with 2 items calculates 50, capped to 25. Cart with 1 item gets no discount.

Example 3: Exclusive discount

Goal: when this discount applies, remove all other plugin discounts.

OptionValue
Discount rule titleVIP discount
Discount priority10
What happens to other discount offers when this offer is activeRemove Other discounts (added by this plugin)

Result: if VIP discount matches, other matched plugin discounts do not apply.

Important Notes

  • Disabled rules never apply, including messages.
  • Future coupon rules never apply as immediate cart discounts. They are evaluated separately after checkout to issue coupons.
  • Applied plugin discounts use coupon IDs pisol-cdrw-discount:{rule ID}. The customer cannot remove them with the normal coupon [Remove] link.
  • Order admin shows applied plugin coupons with rule title and link to the rule.
  • Enable sequential discount under Extra settings affects only Percentage of cart total. Later percentage discounts are calculated after earlier discounts are subtracted.
  • Add discount as under Extra settings selects Coupon (Recommended) or Additional Charge (Old way of applying the discount). Default is Coupon.
  • Shop manager access is controlled by Allow shop managers to access plugin settings under Extra settings.
  • View system name of shipping method under Extra settings shows shipping method system names on checkout for use in Shipping method rules.
  • Rule cache is cleared on save, status change, delete, and clone.

FAQ

Where are discount rules managed?

Conditional Discount menu, Discount rules tab. Use Add discount rule to create a rule.

Does an empty validity period block the discount?

No. Empty start means started. Empty end means not ended.

Does an empty usage limit block the discount?

No. Empty total limit and empty per-user limit mean unlimited.

What happens when multiple rules match?

All matched rules apply, unless a matched rule removes other plugin discounts. Priority decides evaluation order, highest number first.

Can a discount apply only to some products?

Yes. Use Step 5: Apply calculated discount to selected products. Leave empty for all products.

Troubleshooting

  • Discount does not appear: check Status, validity dates, Selection Rules values, Usage limit of this discount, and Usage limit per user.
  • Guest limit still shows discount in cart: guest per-user limit is checked at checkout. Checkout shows Discount {name} usage limit has been reached. and reloads checkout.
  • WooCommerce coupon disappears: check Don't allow WC coupons when this discount is applied on matched rules.
  • Other plugin discounts disappear: check Remove Other discounts (added by this plugin) on the matched rule.
  • Percentage seems too high: check Max discount and Calculate discount percent based on.
  • Message does not show: check Show offer message, Display location, display conditions, and validity dates.
  • Product discount adds nothing: Product type only searches and adds simple products. Check product is purchasable and quantity settings.