Shopify Functions bug - delivery groups array is empty

PatrykJakubik
Shopify Partner
26 1 4

 

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 since 2016 @ Tale Commerce
Looking to offer delivery to pickup points? Try my Atlas Pickup Points app!
Selling on Shopify in Poland? Join our Shopify Polska group on Facebook!
Replies 3 (3)

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
26 1 4

@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 since 2016 @ Tale Commerce
Looking to offer delivery to pickup points? Try my Atlas Pickup Points app!
Selling on Shopify in Poland? Join our Shopify Polska group on Facebook!
RobFarmLink
Shopify Partner
31 2 21

Might have the same underlying cause as this checkout UI extensions bug.