How do I update the shipping rate of an active checkout through my custom app whenever the user adds a discount voucher?
I’ve used the webhook to trigger the function whenever the user adds a discount voucher but I don’t know how to update the data back on the Shopify store
Hi Zaryabdaha,
I believe you’ll need to do the following:
- Start by using the orderEditBegin mutation and create a caclulatedOrder object.
- Use the orderEditUpdateShippingLine mutation to update the existing shipping line.
- Finally use the orderEditCommit mutation to commit the changes.
Hope this helps!