Hi everyone,
I’m facing a confusing issue with available_if in Shopify app blocks and wanted to understand if this is expected behavior or if I’m missing something.
I have a Shopify app block where I’m using the available_if property to control visibility based on a metafield. The metafield is updated dynamically based on the merchant’s billing status.
{% schema %}
{
"name": "Section name",
"target": "section",
"available_if": "{{ app.metafields.namespace.app_enabled }}",
"settings": []
}
{% endschema %}
- When
app_enabled = true, the app block is visible and works fine. - When
app_enabled = false, the app block becomes unavailable (which is expected).
When app_enabled changes from false → true (for example, after the merchant upgrades their plan), the section is completely removed from the theme. The merchant has to manually go to the theme editor and re-add the app block again.
What I expected:
available_if = false→ block is hidden / disabledavailable_if = true→ block becomes visible again in the same place
Instead, Shopify seems to permanently remove the section from the theme once available_if becomes false.
Any guidance or best practices here would really help.