Reading product metafields through ScriptTag API

FootsieNG
Tourist
7 1 1

I'm building a Shopify embedded application with two main points of functionality:

  1. Upon install, product meta fields are populated with some values
  2. Upon page load, a custom script is injected into product page through shopify ScriptTag api

The injected script displays some icon alongside the values from product meta fields.

Currently, from the product page, the injected script is having to request the meta fields from my local server, which then queries the clients shopify for before sending back the response.

Is there a way to access the meta field values directly from the product page, without having to do the above?

Thanks in advance.

0 Likes