Shopify Discount Stacking Rules Explained (2026)

Which discounts combine, which don't, and how to build layered offers on Shopify Functions without losing control of your margins.
A merchant runs a 15% automatic sitewide discount. A customer applies a 20% loyalty code on top. The order goes through at 32% off, not 20%, because two percentages calculated on the same subtotal don't subtract, they compound. Nobody planned that discount. It just happened, because nobody fully understood Shopify's stacking rules before launch.
This is the guide that prevents that. How Shopify's discount combination system actually works, where it breaks, and how to build stacking logic that behaves exactly the way you intend.
Can Shopify discounts stack automatically?
Yes, but only within specific combination rules Shopify enforces by discount class, and two discounts of the same class generally cannot both apply to the same line item. Shopify organizes every discount into one of three classes: product (targets cart lines), order (targets the subtotal), and shipping (targets delivery cost). Shopify's combining discounts documentation lays out the core rule: combination is governed by toggles you set per discount, "Combine with product discounts," "Combine with order discounts," "Combine with shipping discounts," and both sides of a potential combination need to allow it.
Since 2023, automatic discounts and discount codes combine by default in many cases, a change from Shopify's earlier, more siloed behavior. That shift means stores that built workarounds for the old limitation may now be running combinations they never explicitly intended. Discount codes themselves also have a ceiling: customers can apply up to 5 product or order discount codes plus 1 shipping discount code to a single order, per the same documentation, a real jump from the single-code restriction Shopify enforced before 2022.
What actually breaks when discounts stack?
The most common failure is two percentage-off order discounts both calculating against the original subtotal instead of against each other, which compounds savings well past what either discount alone was designed to give. Per Shopify's own documentation, if a cart is eligible for 10% off and a second discount code gives 20% off, the customer doesn't end up paying 70% of the original price after "20% off the discounted price." Both percentages calculate against the original subtotal, so the total discount is genuinely 30% off, not the compounded 28% a naive calculation might assume. Merchant-facing breakdowns of this exact scenario describe it as one of the most misunderstood parts of Shopify's discount system, precisely because the math feels counterintuitive until you've seen it happen on a real order.
The second common failure involves Buy X Get Y. Products inside an active BXGY promotion are ineligible for additional product discounts. If a discount code would apply to a product currently part of a BXGY offer, Shopify removes the BXGY discount and applies only the code, silently changing the promotion a customer thought they were getting.
Shipping discounts have their own rule entirely: they can't stack with each other. Only one shipping discount applies per order, though a shipping discount can combine with a product or order discount.
There's a fourth failure mode worth flagging separately: automatic discounts require the customer to actually add every eligible item to their cart. Shopify's documentation on automatic discounts notes that automatic discounts don't apply to the post-purchase page, and any store still running Shopify Scripts saw automatic discounts execute after Script-modified prices, using the updated line item values. That interaction disappeared entirely once Scripts stopped executing on June 30, 2026, which is itself worth auditing if your stacking logic was ever built around it.
Shopify's discount combination matrix
Discount A | Discount B | Combines? |
Product discount | Product discount (same line item) | No, one wins |
Product discount | Product discount (different line items) | Yes |
Product discount | Order discount | Yes, if both allow it |
Order discount | Order discount | Yes, both calculate against original subtotal |
Shipping discount | Shipping discount | No, only one shipping discount per order |
Shipping discount | Product or order discount | Yes, if allowed |
Buy X Get Y | Other product discount on same item | No, BXGY is removed in favor of the other discount |
Discount code | Discount code | Up to 5 codes per order, if all allow combination |
How do you control stacking without losing margin?
The safest control isn't disabling combinations altogether, it's building explicit selection logic so you decide which discount wins when more than one could apply, rather than letting Shopify's default resolution decide for you. Native discount toggles are binary: combinable or not. They don't let you say "apply whichever discount saves the customer the most, but never both." Deeper audits of large-catalog stores running multiple simultaneous promotions consistently find the same root cause behind margin surprises: a combination toggle enabled years ago, forgotten, and never revisited as new campaigns launched on top of it.
That's where a Shopify Functions-based app adds real control. Flowly: Discount Functions is a free app that builds discount rules with an explicit selection strategy attached to each one:
First — the earliest-created candidate applies, ignoring any others that would also qualify.
All — every eligible candidate applies and stacks, for cases where you genuinely want compounding.
Maximum — whichever candidate saves the customer the most wins (product discounts only).
Minimum — whichever candidate saves the customer the least wins (product discounts only).
Building this on Flowly's canvas means creating a Start node, chaining Condition nodes (cart subtotal, product tag, customer segment, and nine other fields) with AND/OR/NOT logic, and attaching an Apply Discount node with the action and target you want, then choosing the selection strategy before saving. Because the flow can't save incomplete, a rule with no selection strategy set for an overlapping scenario gets caught before it reaches a live cart, not after a Black Friday order comes through at the wrong price. This mirrors what Shopify's own Discount Function API documentation describes at the platform level: discount functions run concurrently with no built-in awareness of each other, so the combination behavior between them has to be explicitly designed, either by the app or by the merchant configuring it.
FAQ
How many discount codes can combine on one Shopify order?
Up to 5 product or order discount codes plus 1 shipping discount code on a single order, per Shopify's current discount combination rules, a limit that's expanded from the earlier single-code restriction but still caps sophisticated multi-code campaigns. Shopify rolled this out in stages, first allowing 5 codes in November 2022, then extending combination logic to order-level and product-level discounts together in a later update.
Do automatic discounts and discount codes combine by default?
Since a 2023 platform update, yes, in many configurations, which is a change from Shopify's earlier default. Merchants who set up automatic discounts before that update and haven't revisited the combination settings may be running stacks they didn't intend.
Can two product discounts stack on the same line item?
Generally no on standard plans. Shopify Plus stores can combine two product discounts on the same line item if both are tagged with matching stacking tags, a more advanced configuration most merchants never enable, and one that requires deliberate setup rather than a default toggle.
Do discount codes and automatic discounts always combine now?
Not automatically in every configuration, it depends on the combination settings of each individual discount. But the platform-wide behavior shifted meaningfully since 2023, and merchant-facing coverage of that change recommends auditing any discount created before the update, since its combination settings may not reflect what you'd choose today.
What happens if a discount function conflicts with a native Shopify discount?
Both run independently, since discount functions don't have visibility into other active discounts. Selection strategy settings on the Function side, and combination toggles on the native side, are what determine the final outcome, which is why testing every promotion before launch matters more with layered discounts than with a single flat sale.
Stacking isn't inherently risky. Uncontrolled stacking is. The fix is making the resolution logic explicit instead of trusting Shopify's default behavior to match your intent. Download Flowly directly from the Shopify App Store before your next multi-discount campaign, not after, or book a call with Subscribfy's team if your current promotion calendar needs a full stacking audit.

Book a meeting with our sales team now!
Create predictable revenue from the customers you already have.