title: WooCommerce Adding Parent attribute automatically
body: <p>I have a WooCommerce site with auto-imported products, which refresh them every week. These products have attributes called COLOR and SIZE.</p>
  <p>However, the COLOR red has these sub-attributes:</p>
  <ul>
  <li>Crimson Red</li>
  <li>Cola Red</li>
  <li>Puma Red</li>
  </ul>
  <p>Normally, I have to manually add and assign these sub-attributes to the &quot;parent RED&quot; attribute and that is a lot of work.</p>
  <p>I wonder if there is a way to do this automatically?</p>
  <p>For example, IF the attribute contains the word RED, assign it to parent attribute RED.</p>