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.

can't get automatic discount code when querying order in graphql

can't get automatic discount code when querying order in graphql

jklue
Shopify Partner
4 0 0

This query does not give me the automatic discount code that was applied on the order...

{
  order(id: "gid://shopify/Order/3881781461190") {
    discountCode
  }
}

 

But you can see there was a discount applied...

Screen Shot 2021-07-01 at 8.56.02 AM.png

 Screen Shot 2021-07-01 at 8.43.08 AM.jpg

discountCode seems to give me text that was added to a discount on a manual order entry via the shopify admin, but not on codes in the cart.

Replies 0 (0)