Variants created by metaobject entries that aren't default Shopify metaobjects always have an empty swatch object

Short description of issue

Variants created by metaobject entries that aren’t default Shopify metaobjects always have an empty swatch object

Reproduction steps

  1. Create a product
  2. Create a metaobject (stitching in this example) > populate two entries. Each metaobject entry has a ‘Name’, ‘Image’ and ‘Color Picker’ field.
  3. Create the respective product metafield and connect to the new meaobject type.
  4. Create a variant option in the product based on the new metaobject
  5. Also connect Shopify’s default ‘Color’ metaobjects as a 2nd variant option.

When you try render those on the front end and trying to access the swatch object on the value, the variants from the custom metaobject always has an empty swatch object.

Additional info

The only way I’ve managed to get around this is to try map variant options that are driven by custom metaobjects to their associated metafield on the product object, so you can then go and get the original meaobject data and output the swatch data yourself, but these feels super hacky.

What type of topic is this

Troubleshooting
General discussion

Upload screenshot(s) of issue