Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.
Solved

Disable App Blocks when user stops the subscription

ertanb
Shopify Partner
12 0 1

Hi,

 

I am creating a Shopify App that contains an extension for Online Store. So users who will install my app, will have access to a Block/Section that they will be able to use throughout their website.

 

As i plan to make it Subscription Based, is it any way that i can disable that Block/Section in users website as soon as they stop the subscription?

Accepted Solution (1)
SBD_
Shopify Staff
1779 263 383

This is an accepted solution.

Hey @ertanb 

 

> The recommended approach is to use the available_if condition using an app metafield to control visibility https://shopify.dev/docs/apps/online-store/theme-app-extensions/extensions-framework#conditional-app...

Scott | Developer Advocate @ Shopify 

View solution in original post

Replies 3 (3)

SBD_
Shopify Staff
1779 263 383

Hey @ertanb 

 

Checking with the extensions team - will report back.

Scott | Developer Advocate @ Shopify 

SBD_
Shopify Staff
1779 263 383

This is an accepted solution.

Hey @ertanb 

 

> The recommended approach is to use the available_if condition using an app metafield to control visibility https://shopify.dev/docs/apps/online-store/theme-app-extensions/extensions-framework#conditional-app...

Scott | Developer Advocate @ Shopify 

ertanb
Shopify Partner
12 0 1

Hi @SBD_ ,

 

Great! Thank you for your answer! I think that should make it work. 🙂 

 

I suppose this is the link on how to add a metafield for an app? https://shopify.dev/docs/apps/custom-data/metafields/app-data