How to fetch data in theme editor for announcement bar

How to fetch data in theme editor for announcement bar

weebySagar
Shopify Partner
24 1 5

I am creating an announcement bar app in Shopify so that other users can install it from app store , I've collected the necessary details like its background color , text and all of things and saving that data in mongo DB . I've created embed app extension so that user can enable and disable in theme editor , so the issue is how can I get the announcement data when its toggle on in the theme editor, should I create an API or there is an alternate approach to it?

Replies 0 (0)