Disable App Blocks when user stops the subscription

Topic summary

Goal: Prevent access to an Online Store app block/section when a merchant’s subscription ends.

Key guidance:

  • For Theme App Extensions (Online Store blocks/sections), use the available_if condition tied to an app metafield that reflects subscription status. When the metafield indicates inactive, the block is hidden in the theme editor and storefront.
  • App metafield = app-owned custom data field; store subscription state there and update it on billing changes.

References shared:

  • Conditional app blocks (available_if)
  • App data metafields

Follow-up/limits:

  • Developers asked if this applies to Checkout UI Extensions. Current limitation: available_if works only for Theme App Extensions. You cannot hide checkout UI extensions from the editor using available_if.
  • For Checkout UI Extensions (and other non-theme extensions), you can only conditionally disable or alter functionality at runtime based on the metafield; the extension remains visible in the editor.

Outcome:

  • Resolved for theme blocks/sections: use available_if + app metafield.
  • Not resolved for checkout visibility: hiding in the editor is not supported; functionality-only gating is possible.

Status: Partially resolved; solution provided for Online Store blocks, limitation acknowledged for Checkout UI extensions.

Summarized with AI on December 22. AI used: gpt-5.

Hi @SBD

using “available_if” attribute, which is working only in theme app extension. How can I execute this in my checkout ui extensions.

Example: I want to enable my custom checkout field extensions(checkbox, textfield, select option components) only to my active subscribed users. Please explain how to do that.? I have stored my subscription status in one metafield, how can I use it to enable or disable my checkout ui extensions in theme editor.

1 Like