Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Is there a limit on how many metafields you can add in the shopify.extension.toml ?

Solved

Is there a limit on how many metafields you can add in the shopify.extension.toml ?

JonnaWiberg
Shopify Partner
23 2 11

Hey,

I have a working checkout extension today with these metafields:

[[extensions.metafields]]
namespace = "pickup_point"
key = "name"

[[extensions.metafields]]
namespace = "pickup_point"
key = "identity"

[[extensions.metafields]]
namespace = "pickup_point"
key = "street"

[[extensions.metafields]]
namespace = "pickup_point"
key = "postalcode"

[[extensions.metafields]]
namespace = "pickup_point"
key = "city"

[[extensions.metafields]]
namespace = "pickup_point"
key = "door_consent"

[[extensions.metafields]]
namespace = "pickup_point"
key = "address"

[[extensions.metafields]]
namespace = "pickup_point"
key = "code"

But if i try to add another metafield i get this error message from the CLI
Skärmavbild 2024-08-16 kl. 08.11.08.png

I only added this metafield code

[[extensions.metafields]]
namespace = "pickup_point"
key = "type"

The error message doesnt really help me, does anyone figured out if theres a limit on how many metafields you are allowed to use in the extension toml file or could it be something else?

Accepted Solution (1)

Liam
Community Manager
3108 344 894

This is an accepted solution.

Hi Jonna - I connected with the Checkout Extensibility team on this and it does appear the limit for metafields in the toml is eight. We'll update the docs to reflect this. Thanks for flagging this!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 3 (3)

Liam
Community Manager
3108 344 894

This is an accepted solution.

Hi Jonna - I connected with the Checkout Extensibility team on this and it does appear the limit for metafields in the toml is eight. We'll update the docs to reflect this. Thanks for flagging this!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

JonnaWiberg
Shopify Partner
23 2 11

Thanks Liam for clarifying this! I was going crazy because i didnt understand this error message.
Is it possible this limit would be increased in the future?

Liam
Community Manager
3108 344 894

Hi again Jonna - we're evaluating this limit to see what would work best for developers and merchants.

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog