For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Hi, I want to develop an app with payment customization extension to disable COD payments for some users.
The users should be those who have some orders in past 30 days having XYZ tag. How to achieve this.
Hi Biptu,
You won't be able to conditionally display payment options based on customer tag, as customer tags are not exposed to checkout extensions. I've logged this feedback with our internal checkout team though.
You can use Shopify Functions to hide payment options based on conditions on their current cart (eg: cart value) so there could be something related to this that you could try?
Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog
HI liam,
Thanks for assisting me, Yes I know that I can't use customer tag to hide certain payment method. But I can use metafield where all the restricted customers ids can be passed separating by commas and then we can build our logic since in the shopify documentation there is a tutorial of hiding payment methods using metafield. But I am facing problem while implementing that example in the UI part. If I can implement that tutorial then my issue will be solve.
Regards,
Biptu