What happens to legacy Metafields created with `value_type` instead of `type` property?

Shopify Expert
2 0 0

I posted this in another discussion but it was marked as solved, so I thought I would post it as its own question about the Metafield deprecated `value_type` property. 


In the reason (https://community.shopify.com/c/shopify-apis-and-sdks/getting-x-shopify-api-deprecated-reason-on-hit...) it states that both fields are supported until 2021-10. Does that mean they are supported until October 1st, 2021 or they are supported until you update your API version to 2021-10?

Another question I have is what happens to the legacy metafields that still have  the `value_type` property.

Do all of those metafields need to be deleted and re-created with the new `type` property?


Will they all be converted to have the new `type` property and all of their values (ex: `integer` will change to `number_integer`) will be changed over to its corresponding `type` from this table (https://shopify.dev/apps/metafields/definitions/types) on a certain date?

Shopify Staff
Shopify Staff
8 3 2

This is an accepted solution.

As of API version `2021-07`, `value_type` is deprecated. This means that both `type` and `value_type` are available for access on `2021-07`.

Once you start using `2021-10`, `value_type` will no longer be available, and you'll have to use `type`. However, you can keep using `2021-07` for 12 months, which will continue to support `value_type` (we support stable versions of our API for a minimum 12 months, though we encourage you to stay on the latest version if possible. https://shopify.dev/api/usage/versioning).

There's no need to recreate any metafields. The only factor here is whether you can use `value_type`, which depends on the version of the API you're using. `type` is automatically converted based on the table that you linked.

I hope this helps