Conversations about creating, managing, and using metafields to store and retrieve custom data for apps and themes.
Hi all,
We are currently building a use case where users can apply loyalty points to a cart from a checkout ui extension and are looking to secure the flow. Anyone can update cart attributes, and customer meta fields are not fulfilling our needs since we have to support guest customers.
The 2023-04 API version brought meta fields to the cart resource
https://shopify.dev/changelog/add-metafields-to-cart-api but they haven't made their way into Shopify Function inputs.
Anyone nows if they would be added there in a near future?
Thanks,
Sam
Hi @sam-,
While we don't currently provide direct support for Functions in this forum, the public [Shopify/function-examples GitHub repository] has an active [discussion board] that might be worth checking out.
Hope you have a great day
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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 Sam -- Did you discover a solution for this?
I am looking to do similar, where for example a Checkout UI extension would add a key value pair that a Product Discount function would read. All in the same app, so private app metafields should theoretically work. But I don't see how to add/read those metafields at a cart level, or buyerIdentity level (can't rely on Customer b/c of guest checkout).