What is the limit for the number of metafields that can be loaded into a checkout extension? The Shopify CLI was telling me that I’d ran into a limit of 8 fields. Is that 8 metafields per resource e.g. shop.metafields vs product.metafields, or is that 8 metafields in total, listed in the toml file?
Hey @doabledanny I connected with the Checkout Extensibility team on this and it does appear the limit for metafiles in the toml is eight.
There is a hard limit when declaring metafields in a checkout extention config.
- Shopify Internal tooling currently enforces a limit of 8. Like [[extensions.metafields]] entries in your shopify.extension.toml for a given Checkout UI extension.
That 8 metafield limit means it’s a limit on the number of metafield declarations you list in the extension’s TOML config. It’s not a per resource tyoe or namespace, it’s a total count of metafields you can register in that extension’s configuration.
That means when you are adding
[[extensions.metafields]]
namespace = "product"
key = "foo"
[[extensions.metafields]]
namespace = "shop"
key = "bar"
those count toward the same 8-field total.