Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
When creating a checkout via the Checkout API, how can we hide the discount code field?
Under some conditions, the checkout created via the Checkout API cannot accept additional discounts.
To ensure additional discounts cannot be added, the discount code field must be hidden in those cases (similar to how the checkout of a Draft Order invoice url behaves).
How can we hide this field conditionally when using the Checkout API?
Would appreciate if someone could comment on this.
Many thanks in advance.
At this time there's no way to directly influence that field's appearance on checkouts unless you have access to edit the checkout liquid on a Plus store, but it definitely looks like this has been getting requested for some time. The checkouts/discounts teams are likely aware of this but I'll make sure that doesn't slip through the cracks.
Cheers.
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Thanks for helping to bring this to the attention of the relevant teams Alex.
Appreciate it!
Resolving this will help the merchant, our mutual customer, to have much needed control over their margin and flexibility in their use of discount codes!
Hey @DiscountNinja ,
May I ask how are you creating a checkout with the Checkout API and then have these checkouts completed through Shopify's storefront checkout interface?
Thanks,
Amos