How can I retrieve product variant metafields on checkout UI extension?

remy727
Shopify Partner
40 2 19
Hi everyone!
Is it possible to retrieve product variant metafields on the checkout UI extension?
Neither useAppMetafields nor useMetafields react hooks don't work.
The solution I found:
  • Get variant IDs with StandardAPI.
  • Then use storefront API for each variant to retrieve metafields.

But if there are 10 line items, this requires 10 storefront API calls.

Is there any better way?

Looking for a Shopify App developer? Please visit: https://github.com/remy727
Reply 1 (1)
charles_loder
Shopify Partner
23 1 4

Any update on this? I got the same question