Hi there,
The shopify.app.extensions() functionality is extremely helpful for app developers but show real time feedback that the app is installed correctly in the Shopify checkout, thank you pages, etc.
But I believe there might be a critical issue with it - it doesn’t seem to be Checkout Profile aware.
At this time, all extensions are returned regardless of which checkout profile they are assigned to.
Merchants can have multiple checkout profiles, but only one published one. The shopify.app.extensions() doesn’t seem to filter based on the currently published Checkout Profile.
This means that the merchant’s checkout could be using a Checkout Profile that does NOT have your app’s extensions installed, yet the extensions() query only returns the target so you have to assume it is.