Developer changelog

Subscribe to the changelog to stay up to date on recent changes to Shopify’s APIs and other developer products, as well as preview upcoming features and beta releases.

Get updates by RSS

lineItem.discountedTotalSet can optionally include code based discounts

API

As of the 2024-04 version of the GraphQL Admin API, you can use the new argument withCodeDiscounts on the order.lineItem.discountedTotalSet field to include or exclude line item discounts originating from a discount code. The current behaviour of discountedTotalSet is to exclude code based discounts and as such, the default value for this option is false so there will be no change required for clients who want to continue to have them excluded.

See the documentation for discountedTotalSet on Shopify.dev. The argument is already available on the unstable Admin API.