Re: Theme App Extensions & Subscriptions

Solved

Theme App Extensions & Subscriptions

mattdenoronha
Shopify Partner
35 1 14

So the new theme app extensions are available to a theme when an app is installed, ok great.

How does this work with subscriptions? A store can install an app without subscribing, giving them access to the extensions without paying.

How do we limit access to theme app extensions until a store subscribes? Are all theme app subscriptions only for free apps?

Accepted Solution (1)
rayvvond
Shopify Partner
13 1 4

This is an accepted solution.

Hi guys ! The solution :

- Use app meta data to set boolean in app backend.
- Use available_if config in app embed schema like:

"available_if": "{{ app.metafields.applicationInstallation.hasPlan }}",
 

 

View solution in original post

Replies 13 (13)

Bunty
Shopify Partner
133 39 82

Hi @mattdenoronha, it's correct that merchants would be able to add the theme app extension, but you still control what happens inside it and would have total control of when to enable/disable the feature provided by the extension based on your own business rules.

mattdenoronha
Shopify Partner
35 1 14

Thanks @Bunty 
So would that be, every view of the section would require a call to our servers to check if we've marked that store as subscribed, then render the section if they've paid? Seems quite extensive and likely to slow the page just to display what may be a simple section with some text and images.

I can't think of a less intensive way.

mattdenoronha
Shopify Partner
35 1 14

Does anyone have an idea on this? Is there a way to limit theme app extensions to only subscribed stores? One that doesn't require a server call on every page view? Will standard theme app extensions only be for free apps?

Bunty
Shopify Partner
133 39 82

Not necessarily, there are techniques to mitigate calling the backend on each view, like session caching, or I believe you can use liquid in theme app ex, so you could also use metafields. The World is your oyster.

davebhatt777777
Visitor
2 0 1

Hi , what if we want to hide the app blocks provided by theme app extension for the app if any user clicks on unsubscribe is it not possible.

franndotexe
Shopify Partner
2 0 1

Bumping this. If a merchant installs the app and clicks cancel on the subscription approval page, they can still insert the app block into their theme without issue and there does not appear to be anything in the Shopify docs on how to handle this scenario with regards to Theme App Extensions and showing them in theme sections.

 

I'm not sure how to go about checking subscription status in the app block liquid. Even then, they would still be able to add the block and devs would be responsible for showing a non-standardized subscription status message in the rendered app block.

 

Is there an example of handling this for Theme App Extensions in the Shopify docs or a Github repo?

 

If we need to manually maintain an external source of the merchant's subscription status for Theme App Extensions it adds a significant amount of overhead to handle something Shopify already has APIs to accommodate.

 

Are there hooks we can use for showing the app block in the Theme Editor?

franndotexe
Shopify Partner
2 0 1

Bumping this again.

 

I've spent some more time looking around in the docs and seeing what's available to solve this issue, but am not coming across anything useful.

 

Being able to toggle the availability of the Theme App Extension based on whether or not the merchant is up-to-date on their payments for the app seems like an important feature for Theme App Extensions.

 

Is something like this available?

rayvvond
Shopify Partner
13 1 4

Hi guys ! Any news about that ? @Shopify 

rayvvond
Shopify Partner
13 1 4

This is an accepted solution.

Hi guys ! The solution :

- Use app meta data to set boolean in app backend.
- Use available_if config in app embed schema like:

"available_if": "{{ app.metafields.applicationInstallation.hasPlan }}",
 

 

ppat98
Shopify Partner
8 0 1

Hey, have you found any solution for using an "OR" operator in the available_if option? I have it working with one metadata value but when I use an OR operator and add in another value, it gives me an error. I'm not sure it works as I want, but I also don't know of a workaround. Any help would be appreciated.

jfkScollar
Shopify Partner
16 0 2

I like this approach, but how is the metafield handled when the app is uninstalled? 

lima195
Shopify Partner
6 1 2

The theme extension should be removed automatically when the app is uninstalled.

conversionist
Shopify Partner
78 8 9

You can just delete the metafield with the Unisntall webhook

Building 100 Shopify apps for that BMW M5 dream

Follow the journey at https://www.youtube.com/@conversinist
https://conversionist.online/