Metafield collection object
These Shopify REST-backed Liquid objects are legacy. The product and variant Liquid objects no longer work, and Shopify is phasing out the REST Admin API that these objects depend on. Use GraphQL for new work; see the Shopify REST Admin API notice and migration guides.
A metafield collection object is an iterable set of metafields, which also supports using lookups to narrow the set by metafield namespace, or, further, to identify a single metafield by looking up by key.
How to access it
Use
resource.metafieldsto retrieve the full set of that resource's metafieldsUse
resource.metafields.namespaceto retrieve the full set of that resource's metafields, filtering by metafield namespaceUse
resource.metafields.namespace.keyto retrieve a metafield representation object – unless the referenced metafield has a deprecated type, in which case the parsed metafield value is returned directly
Supported Liquid resources
Article
Blog
Collection
Customer
Order
Page
Product
Shop
Variant
Last updated
Was this helpful?