Shopify Deprecates discount Class
Field Use discount Classes
Instead
Shopify has rolled out an important update to the Draft Order Platform Discount object. The old discount Class
field is now deprecated and replaced with a new discount Classes
field. This enhancement allows you to represent multiple discount classes such as product, order, and shipping discounts in a single draft order discount object (shopify.dev).
What Changed and What You Should Know
-
Previous behavior: Draft orders supported a single
discount Class
, limiting flexibility in complex promotions. -
New approach:
discount Classes
lets multiple discount types coexist in one discount entry ideal for combos like percentage-off plus free shipping under the same rule. -
Presentation Level remains key: To assess how a discount affects the order, continue using the
presentation Level
field for clarity on which items are impacted (changelog.shopify.com, shopify.dev).
Why It Matters
Better Tracking of Complex Discounts
If you offered combined promotions (e.g. product discount + shipping discount), you can now represent each with precision in a single object.
Cleaner and Future-Proof Code
Removing deprecated fields keeps your integrations up-to-date and less prone to breakage. Switch to discount Classes
now to avoid future compatibility issues.
RTL Compatibility with New Discount Functions
Shopify’s extended discount functions rely on richer discount metadata. This new field supports evolving discount setups across different checkout flows.
Next Steps for Developers & Merchants
-
Audit your code to find any reference to
discount Class
and update it todiscount Classes
. -
Refactor your logic to handle multiple discount types under one rule.
-
Test draft order creation and invoice flows where multiple discount types apply to ensure UI accuracy.
Final Thought
This change introduces more flexibility for complex discount schemes making your discount data more accurate and your integrations cleaner. While it's backward-compatible, updating now will ensure smoother operations in future Shopify releases.
If you're using draft orders with custom logic especially creating combined discounts or automations we can help update your setup. EcomSpiders offers free consultations to migrate existing fields, audit your draft order workflows, and ensure your implementation is robust and future-ready.
Visit EcomSpiders.com to get help or schedule a review today.
0 comments