Use shop metafield in checkout ui extension #1730
sov-brandstaetter
started this conversation in
Feedback: Extensions APIs
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
is there somewhere a tutorial on how to use shop metafields in the frontend / checkout ui extension?
I'm already able to create the shop metafield in the backend, but when I try to query the metafield key and namespace in the frontend unsing graphql with the following query, I get null as a response:
query MyQuery {
shop {
metafield(key: "my_items1", namespace: "my_fields1") {
id
}
}
}
When using the hook useMetafields({metafields: "my_fields1"}) I get an empty array.
What I want to achieve is defining settings in the admin UI / app and then read them from my checkout ui extension.
Thanks in advance for your help
Beta Was this translation helpful? Give feedback.
All reactions