Editing Variant Options with Category Metafield
The situation......
You would like to add a new color variant to your product using our app. To do this, you create an "Add a Variant Option Value" task (for multiple variants) within the Variants & Options task function.
You can check our Add Option Values/Variants to my Products for more information on how to add variants.
However,
The task log was labelled Failed. Furthermore, the error log shown on why the task failed is unfamiliar to you.
What does the error mean?
This error indicates that the variant is linked to a category metafield, preventing it from being edited through the task.
A variant is considered connected to a category metafield if, in the Variants section of the product page in Shopify Admin, the option values and this icon appear highlighted in blue:
Similarly, the Category metafield displays the icon to indicate it is connected to a variant:
Can I still edit my variants?
If the variants being added are already part of the existing list linked to the category metafield, the task should complete without issues.
However, if the variant is not on the existing list, the error will occur.
Editing the category metafield instead,
A different error will appear, indicating that the metafield is linked to an option and suggesting that you edit the Variant option instead.

What can I do?
In this case, we suggest temporarily disconnecting the link between the metafield and the option, editing the variant, and then reconnecting them.
Please note that if multiple products are affected, you will need to disconnect each one individually for the app to edit the variants.
To do so, follow the steps below:
Open the Shopify Product Admin and select the product that has the category metafield linked to the variant option value..
Check the Variants section. As mentioned earlier, a variant option linked to the category metafield will be highlighted and display an icon on the right.
Click on the Icon, and tap Disconnect. A confirmation pop-up will appear, and here we click Confirm , and afterwards, Done.
Click Save to confirm changes made.
Reconnecting Metafield-Option Value
After editing, in the Shopify Admin Product page, if you connected this back to the category metafield, the Category metafield will copy the value added.
On the other hand, doing the opposite by adding the value in the category metafield instead and then connecting this to a variant option will result to the value getting removed.