My app got rejected with a message “Your app is currently using ScriptTag API. Update your app to theme app extensions to ensure compatibility with Online Store 2.0 themes.”
When the app is installed an asset and the script tag are added to the store.
The asset js file is built dynamically using some data from third-party applications(This application has an authorization API key which we have stored in the shop private meta field).
eg of the js file.
var someId = '${Id}';
(function () {
var s = document.createElement('script');
s.async = true;
s.src='some src';
var parent_node = document.head || document.body;
parent_node.appendChild(s);
})();
How can we add asset files dynamically to theme app extensions from Shopify App or if we can add content dynamically from the app to the theme app extension asset folder?