Why can't I name my field "first", "last" or "size"?

Over time, we have found that using the metafield names "first", "last" and "size" is problematic. These names also exist as Liquid filters in Shopify and can be used as a dot notation - see for example: https://shopify.github.io/liquid/filters/size/ Using this construct in Liquid:

{{ product.metafields.bundle.size }}

can potentially mean any of these:

  1. The value of the "bundle.size" metafield

  2. The length of the namespace name itself - "bundle" = 6

  3. The number of metafields within the namespace "bundle"

To minimize any issues, ACF blocks you from using these custom field names with problematic ambiguous meanings in Liquid.

Last updated