Discussing Shopify Functions development, deployment, and usage in Shopify apps.
.. when entering checkout via draft order link.
@Nick_Wesselman, @ShopifyDevSup and anyone else 🙂
As the subject states. I have discovered that payment customization functions will not get triggered if you enter the "alternate" checkout via a draft order link. I can reproduce this issue quite easily and have set up a demonstration.
I created a draft order, the link is below.
https://ecom-checkout-dev.myshopify.com/84909195540/invoices/d4340c3dddb7eab632481b08c5559351
you can get there without the need of the store password. When you get to the payment methods. The method "Auf Rechnung" is shown. This should NOT be the case since I have a function that should hide the payment method based on a number of metafields attached to the users account, this particular account has no such metafields set.
Now if you leave the cart and thereby the draft order and return to the shop (password: dadiel) put something in the cart and proceed to the checkout. When you get to the payment methods only the Bogus gateway will be shown, since the payment customization function was triggered.
This is a huge, huge oversight the draft order goes to a completely different checkout than the normal order process.
The "normal" checkout url:
The draft order checkout url:
https://ecom-checkout-dev.myshopify.com/checkouts/do/d4340c3dddb7eab632481b08c5559351
One triggers checkout functions, the other does not! Please get this fixed ASAP. I have already submitted a ticket to partner support.
Cheers,
Gary
Solved! Go to the solution
This is an accepted solution.
Hi @garyrgilbert --
Currently the payment customization API does not support draft orders. There is a feature request here, I'd recommend upvoting and adding a comment that describes your use case.
-Nick
Nick Wesselman | 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
This is an accepted solution.
Hi @garyrgilbert --
Currently the payment customization API does not support draft orders. There is a feature request here, I'd recommend upvoting and adding a comment that describes your use case.
-Nick
Nick Wesselman | 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
Hi Nick,
Thanks for clarifying that it is not a bug but a huge oversight 🙂
Apparently I totally missed that limitation when reading the docs and building the customizations. Thats a huge limitation for some of our customers who use apps that generate draft orders and route the customer to the draft order afterwards.
Especially when you consider the customization is supposed to hide a payment method, and then suddenly for draft orders it doesnt? I mean honestly anywhere else where it couldnt cause financial issues I could understand, but suddenly allowing payment on Invoice for example for a customer that shouldnt be is really bad.
Anyway thanks for clarifying I added my two cents to the linked issue.
Cheers,
Gary
Just as a side note to this Nick.
This may not technically be a bug, but it sure as heck is very close. Why has shopify been forcing adoption of the new checkout and then "forgetting" that there are still actually 2 (or perhaps even more) checkout systems in play, and one which does not yet support the new checkout apis.
This is a horrible oversight, in my opinion. I know that the ecosystem is huge but the checkout is shopifys "little darling" the whole premise behind the checkout is that it just works and now we have two, where one actually doesnt "just work" in fact it's only half a checkout where Plus merchants who have paid to have features built to extend it have a huge caveat.. Sure I guess in the end it's my/our fault for not seeing the limitation and informing them that it doesn't work for draft orders but still.
Ok thanks for reading, I feel better now to get that off my chest 🙂
Cheers,
Gary
Im with you Gary, this is a MASSIVE oversight!