We have an Integer metafield for products which already contains values. It no longer needs to validate as an integer. Can I change it to Single Line Text? I don’t want to recreate the metafield to avoid having to re-enter all the information.
Hey @markdc – Strat here from Shopify ![]()
We don’t yet provide the ability to edit metafield definitions. That said, you can delete an existing definition (without deleting the metafields!) and create a new definition over the existing namespace and key. You can do that in the Settings > Metafields section of the Admin:
- Open the definition that you’d like to change.
- Delete the definition but do not delete the metafields – you’ll see a popup modal with some options when you try to delete the definition.
- Now go to the “Metafields without a definition” tab in your settings. You should see a list item for your metafields under the existing namespace and key.
- Select “Add a definition” for the existing metafields.
- You can select any definition type that you want, including text.
Updating metafields from integer to text should be a seamless process. If you’re changing definitions that don’t overlap – for example, going from JSON metafields to integer – you will see a warning to migrate your metafield values after creating a new definition. I hope that’s helpful!
I wanted to do this as I have a metafield connecting to a page and I wanted to change it to allow multiple pages to be selected (I was hoping to code a liquid object that would loop through and generate tabs with the page content). however in my test when trying to create a new definition it does not allow me to choose pages.
I attempted to use this process to change a multiline text metafield into a rich text metafield, but the “Rich text” option was greyed out/unselectable in step 5. Is there a workaround or some kind for this? Thanks.
Hi, @AtomicBP !
I’d recommend reaching out to our live support here at the link so that we can check this out further for you. Thanks!
Could you find a solution to this? I’m having the same problem