How To Detect App Blocks (Not App Embedded)?

How To Detect App Blocks (Not App Embedded)?

TheWatcher4363
Shopify Partner
1 0 0

I have found a way to detect App Embedded Block by check the settings.json in the asset files. While I can also do the same for App Blocks by checking each json file for pages that has them, it is not efficient since I have to check every single file.

 

Is there a way to check if App Blocks is enabled for any page at all? Is there any config files that stores the app blocks info, or do I have to check all the json file to get it?

Replies 2 (2)

Todd_Trimakas
Shopify Partner
144 0 28

Did you ever find this out? We're looking, the app block is installed but `settings_data.json` does not have a blocks section at all.. AND this is a 2.0 theme.. Sooo yea no idea here.. 

ByteStand - Amazon to Shopify in one click
den232
Shopify Partner
220 8 56

Oct 2024: Would be nice if the admin graphQL 10-2024 included this ... but not yet ... 

 

On this page  there is a section, which does work for me ... but it uses the dying REST ... jb

If you want to identify whether a merchant has added app blocks to their theme, or enabled app embed blocks, you can use the Asset REST Admin API resource to look for blocks that match your app type.