This has caused several bugs. Anyone else having issues with this?
Users assign some data to Product X in an app and the app sets metafields to store it so it’s accessible via theme extension or similar. Let’s say they add the product’s best by date which is then displayed to users. Then a user clones Product X in the Shopify Admin. Now the cloned product has the same date even though the user never set this.
A better (worse) example: an app sets a metafield to denote that a product is under discount. User clones it. Now the new product is also marked as being discounted!
Is there an upside to cloning metafields? I can’t think of one.
At minimum shouldn’t users see a checkbox like they’re currently shown for other properties when cloning?
Product metafields being copied when a product is duplicated is native behavior. For some merchants, this is helpful because they store a lot of data in metafields, and having those values copied during duplication saves them from manually re-entering the same values in the admin.
That said, I can see how this creates issues for the kinds of metafields you described. I’ve submitted a feature request to either give merchants a choice over whether metafields are duplicated, or give apps a way to indicate that specific metafields should not be copied during product duplication. With feature requests, we’re not able to confirm when or if they’ll be implemented, so I recommend keeping an eye on our changelogs for updates.
Maybe you can say they want this for metafields with definitions that they created but, outside of that, what is the use case in which one would want to retain all metafields written by all app apps ever installed for the lifetime of the store (metafields are not necessarily deleted on app uninstall)? Seems a bit risky to assume that all the metafields on the product set by all apps they’ve ever installed should be carried over.
@sshaw Product metafields being copied during duplication is longstanding native behavior (10+ years), and changing that default could introduce regressions for shops and apps that already rely on it.
That’s a fair distinction between merchant-managed metafields and app-managed data. App-owned and app-data metafields are removed when the app is uninstalled, so they don’t remain on the store indefinitely. But the duplication behavior can still be a concern when app-managed values are copied to a new product. That’s why the feature request is focused on giving merchants a choice during duplication, or giving apps a way to mark specific metafields as not copyable.
Product metafields being copied during duplication is longstanding native behavior (10+ years), and changing that default could introduce regressions for shops and apps that already rely on it.
Duplication of variant-level metafields was added in 2024 No one needs app-specific metafields copied.
App-owned and app-data metafields are removed when the app is uninstalled, so they don’t remain on the store indefinitely.
They’re only removed if they have a definition. Definitions have existed for 3 or so years. if there’s no definition then they’re not removed.