I’m not able to accessing a shop metafield value on the Order Status (Account) page using a Shopify extension. What is the correct way to fetch shop metafield values on the Order Status page?
I am also not able to fetch shop metafields on order status page.
I have added metafields configuration in .toml fille but still not able to get the metafield meanwhile same metafield is accessible on checkout ui extension.
Hi @vikasbind
The Order Status page uses a more restricted API than the checkout flow, often requiring separate permissions. First, ensure your shop metafield definition in the Shopify Admin has Customer accounts access set to Read. Without this explicit permission, the restricted API will block the data even if your extension is configured correctly.
In your shopify.extension.toml, verify that you are using the correct namespace and key without adding shop. or order. prefixes. Additionally, ensure you are using the useAppMetafields hook to retrieve shop-level data rather than hooks scoped only to the order. Aggressive caching on the Order Status page can also cause issues, so try testing in an incognito window if the array remains empty.
Hope this helps!
Thanks!! It worked. Metafields are accessible now.