Shopify Functions bug - delivery groups array is empty

PatrykJakubik
Shopify Partner
21 1 1

 

Currently, I am working on an app that makes use of Shopify Functions and I have a question regarding payment customization.

 

I have noticed that the deliveryGroups array is empty when a buyer visits the checkout page sent through the "Send invoice" button on unpaid orders, despite a delivery method being preselected at that stage of the checkout. I suspect this to be a bug.

 

This issue creates a problem as we have a function that hides payment methods based on the selected delivery method. If we do not receive information about the selected delivery method, no payment method will be hidden, which means that the buyer can select a payment method that is not allowed for a specific delivery method.

Is there a way to resolve this issue?

 

Thank you.

Shopify Partner @ Tale Commerce
Selling on Shopify in Poland? Join our Shopify Polska group on Facebook!
Replies 2 (2)
agastify
Shopify Partner
8 0 2

The Payment Customization API doesn't currently support draft orders.

https://shopify.dev/docs/api/functions/reference/payment-customization#limitations

PatrykJakubik
Shopify Partner
21 1 1

@agastify, I find this situation perplexing because when the merchant clicks "Send invoice" for an unpaid order, the order already exists in the system and is not considered a draft. We can confirm that the function has been executed as it has thrown an error. Therefore, I suspect that the issue may lie elsewhere.

Shopify Partner @ Tale Commerce
Selling on Shopify in Poland? Join our Shopify Polska group on Facebook!