title: WooCommerce Variations Attribute Label
body: <p>I am trying to modify a plugin (Eggplant Variations Add-to-Cart) with the desired result being that rather than the attribute slug being formatted and displayed, I want it to actually show the true value of the attribute.</p>
  
  <p>For example, I have an attribute 'Option' with values 'Red &amp; Green | Blue &amp; Yellow'.  These are used for variations.  Currently this plugin will display 'Red Green' or 'Blue Yellow'.  This is due to this line:</p>
  
  <pre><code>printf( '&lt;span class="attr attr-%s"&gt;%s&lt;/span&gt;', $key, ucwords($val) );
  </code></pre>
  
  <p>All that is happening here is the slug is being converted so that the dashes and underscores are replaced with spaces and each word is capitalised first letter.</p>
  
  <p>The variations and attributes are being retrieved via:</p>
  
  <pre><code>$variations = $product-&gt;get_available_variations();
  $attributes = $product-&gt;get_attributes();
  </code></pre>
  
  <p>There is no reference point between these variables in order to retrieve the $attribute value using the $variations attribute slug.</p>
  
  <p>How can I return the true attribute value (ie 'Red &amp; Green', 'Blue &amp; Yellow')?</p>