For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Hi!
I am currently developing a Shopify app which creates an App embed block the user can activate or not.
I would like to display if the user has already activated the embed block in my app but I don't find any API for this purpose.
Is there a way to perform this?
Thanks!
Hi GuillaumeFg,
I totally see how it would be helpful to reflect on your apps' UI when the embed block is active - I've connected with our internal devs to see if this is possible.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi again Guillaume,
The product team got back to me and while Shopify does not support this at the moment, we're aiming to allow this functionality in future API versions.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hey @Liam & @GuillaumeFg !
Based on Shopify documentation, this should be possible here
I needed this for my app so I did some investigation on how I can detect if app embed is added by user or not.
Here is what I have found using Remix.
In your loader function, first find the active theme ID, then read the settings_data.json file. The app embed data will be saved in this file when user enable it.
`
{
"current": {
"sections": {
...
},
"content_for_index": [
],
"blocks": {
"17878678986028907411": {
"type": "shopify:\/\/apps\/faceforms-better-pop-ups\/blocks\/app-embed\/f2173231-e611-461d-884b-bd8e6cc2ded4",
"disabled": false,
"settings": {
...
}
}
}
}
}
We custom Shopify themes and apps
Hey @Hujjat thanks for reply, I see asset api is marked as deprecated. Did you find any other way for verification?
After checking docs carefully I see reading is not a problem so we can use this method 🙏
great tips! shopify also has this guide for checking if an extension is installed:
look good. Thank you
Hi @Liam is there any news on when Shopify plans to make this feature available via API? Knowing any timeframe would be a great help.