--- title: Cart metafields are accessible in Shopify Functions and Checkout UI extensions - Shopify developer changelog description: Shopify’s developer changelog documents all changes to Shopify’s platform. Find the latest news and learn about new platform opportunities. source_url: html: https://shopify.dev/changelog/cart-metafields-are-accessible-in-shopify-functions-and-checkout-ui-extensions md: https://shopify.dev/changelog/cart-metafields-are-accessible-in-shopify-functions-and-checkout-ui-extensions.md --- [Back to Developer changelog](https://shopify.dev/changelog) June 20, 2025 Tags: * Functions * 2025-07 # Cart metafields are accessible in Shopify Functions and Checkout UI extensions You can now read cart metafields in the [GraphQL input query](https://shopify.dev/docs/api/functions/2025-07/cart-and-checkout-validation#Input.fields.cart.metafield) for Shopify Functions. Checkout UI extensions can also read and write cart metafields for abandoned carts, order edits, and draft orders, in addition to previously supported resources. Notably, cart metafields are carried over to abandoned carts for later use. For security, use a reserved namespace to ensure only your app can access specific cart metafields. **Note**: If you modify cart metafields using the [`cartMetafieldsSet`](https://shopify.dev/docs/api/storefront/2025-07/mutations/cartMetafieldsSet) or [`cartMetafieldDelete`](https://shopify.dev/docs/api/storefront/2025-07/mutations/cartMetafieldDelete) mutations, then the changes won't be available to Shopify Functions until the buyer goes to checkout or performs another cart action that triggers the function. **Example: Read a cart metafield in a function input query** ``` query RunInput { cart { myCartMetafield: metafield(namespace: "myNamespace", key: "myCartMetafield") { value } } } ```