Metafield Definition Capability Framework and Deprecation of use_as_collection_condition
use_as_collection_condition
As of API version 2024-10, we're introducing the Metafield Definition Capability Framework and deprecating the field on the Metafield Definition object. The new
capability will replace the deprecated field, providing a more flexible and extensible way to manage metafield behaviors in smart collections.
What's changing?
- The
field on Metafield Definitions is being deprecated.
- A new
capability is being introduced as part of the Metafield Definition Capability Framework.
Why it matters
The new Capability Framework offers several benefits:
- Improved flexibility: Capabilities can be easily added, removed, or modified without changing the core Metafield Definition structure.
- Better extensibility: New capabilities can be introduced in the future without affecting existing implementations.
- Clearer semantics: Capabilities provide a more explicit way to define metafield behaviors.
How to update
To prepare for this change, update your API calls and app logic as follows:
Instead of setting
, use:
capabilities: { smartCollectionCondition: { enabled: true } }
When querying metafield definitions, check the
capability instead of the
field:
query { metafieldDefinition(id: "gid://shopify/MetafieldDefinition/1234") { capabilities { smartCollectionCondition { enabled } } } }
Timeline
- API version 2024-10: The new capability is available, and
is deprecated but still functional.
- Future version: The
field will be removed entirely.
We recommend updating your integrations to use the new capability as soon as possible to ensure a smooth transition.
Learn more about metafield capabilities at Shopify.dev Learn more about the Metafield Definition Capability Framework at Shopify.dev.