Shopify Functions

Shopify Partner
1 0 0


I've successfully followed a few of the docs tutorials but am currently trying to write a delivery customization to update the standard delivery cost to $0 during checkout for specific customers and I'm not sure how to update the delivery cost using Shopify functions.

My graphQL query input is correct, so I have the cost amount value in my input response but if I try to simply grab the standard deliveryOption object and update the amount property of the cost property, it tells me the function has returned invalid JSON (in admin).

The docs use a return operation array that uses a HideOperation and theres also a RenameOperation & MoveOperation but none of those support changing the delivery cost, only the titles. Can anyone please let me know how to simply update the value of the delivery option cost using a Shopify function, any help is greatly appreciated.

Replies 0 (0)