Shopify / theme-extension-getting-started

A theme app extension boilerplate that highlights the basic structure and features that are available to developers who want to integrate their apps with Shopify Online Stores.
https://shopify.dev/apps/online-store/theme-app-extensions/getting-started
MIT License
108 stars 45 forks source link

How I can render theme app extension's "App Block Liquid" only for paid user? #2

Open thehriday opened 3 years ago

thehriday commented 3 years ago

Suppose, I have 2 plans. The first plan is free and the another plan is paid.

So, how I can render theme app extension's "App Block Liquid" only for paid user?

Sky-bits commented 2 years ago

@mshridoy I am also looking the solution how you figure out.

jsullivan5 commented 2 years ago

I need to do similar and thinking of either calling the app API via App Proxy or maybe attach some metafields to the Shop.

Sky-bits commented 2 years ago

@jsullivan5 can please suggest the solution ?

jsullivan5 commented 2 years ago

@sanjay-ios-io So they recently released conditional app blocks for this purpose.

So add a boolean app owned metafield when you create the billing subscription and reference it in the app block schema. It's like what I was thinking with metafields just natively supported.