Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

What does allowDiscountCodesInCheckout boolean do in draftOrderUpdate?

What does allowDiscountCodesInCheckout boolean do in draftOrderUpdate?

soulchild37
Shopify Partner
194 9 58

According to the documentation : https://shopify.dev/docs/api/admin-graphql/unstable/mutations/draftOrderUpdate#argument-input

I have set the allowDiscountCodesInCheckout boolean to true , but I still do not see the discount code field being available in the checkout page of a draft order, is this a bug?

Spent too much support time dealing with order cancellation request from customer? Wouldn't it be good if customer can cancel order on their own without bugging your support? Try out Cancellable app! https://apps.shopify.com/cancellable . I also write articles about store customization that can improve your customer shopping experience here : Yagi Software Blog
Reply 1 (1)

Cedigest
Shopify Partner
1 0 0

Can confirm the same issue with this flag, and the other one - acceptAutomaticDiscounts.

Both do not work.

 

However, interestingly, it seems like it was only released for the API version 2024-07 - https://shopify.dev/docs/api/release-notes/2024-07 and is in 'highlights' for major features for that release.

 

EDIT: i guess, i figured this out myself. I was using the Admin APIs for the draft creation (rookie mistake :)), which still doesn't have a discount flags. Reworked this to be 2024-07 GQL client - and it works as expected.