The acceptAutomaticDiscounts: false
parameter in draft orders is no longer being respected during checkout. Automatic discounts are being applied despite this setting being explicitly disabled on draft order checkouts.
When acceptAutomaticDiscounts
is set to false
, only manual discount codes and custom draft order discounts should be applied during checkout.
The actual behaviour, all automatic discounts are being applied during checkout, even when acceptAutomaticDiscounts: false
is set. The parameter no longer stops automatic discount codes from being applied, used, or redeemed at checkout.
Draft Order Response (showing correct parameter values):
draftOrderFinalized: {
__typename: 'DraftOrder',
name: '#D355',
ready: true,
acceptAutomaticDiscounts: false,
allowDiscountCodesInCheckout: false,
subtotalPriceSet: {
presentmentMoney: { amount: '1129.95', currencyCode: 'AUD' },
shopMoney: { amount: '1129.95', currencyCode: 'AUD' }
}
}
The invoice that gets created has the discounts on the order regardless.
According to the official documentation:
“Whether or not to accept automatic discounts on the draft order during calculation. If false, only discount codes and custom draft order discounts (see
appliedDiscount
) will be applied. If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts.”
The API response confirms both acceptAutomaticDiscounts
and allowDiscountCodesInCheckout
are set to false
, yet automatic discounts are still being applied during checkout.
This appears to be a regression that breaks existing functionality for merchants who need to control discount application on draft orders. We’re specifying that products cost X amount with the discounts baked into the price of the product. Shopify ignores this instruction and double-discounts the product by auto-applying automatic discounts to all items on the order.