title: WooCommerce get variable product attribute label
body: <p>I'm trying to display the details from my custom product attributes on a table on my single product page. I can get the product variation SKU, but I can't seem to get the "label" (the best I can do is get the slug).</p>
  
  <p>This is the code that I'm currently working with:</p>
  
  <pre><code>&lt;!-- ******* START PRODUCT VARIABLE TABLE SECTION ******* --&gt;
  &lt;?php
  global $woocommerce, $product, $post;
  
  if( $product-&gt;is_type( 'variable' ) ) :
  
    $available_variations = $product-&gt;get_available_variations();
  
    // START CHECK IF VARIATIONS ARE PRESENT
    if ( $available_variations ) :
  
    $attributes = $product-&gt;get_attributes();
  ?&gt;
  
  &lt;div class="row"&gt;
      &lt;div class="small-12 column"&gt;
          &lt;table class="varations-table"&gt;
              &lt;thead&gt;
                  &lt;tr&gt;
                      &lt;th class="small-4"&gt;ORDER #&lt;/th&gt;
                      &lt;th class="small-5"&gt;DESCRIPTION&lt;/th&gt;
                      &lt;th class="small-3"&gt;UOM&lt;/th&gt;        
                  &lt;/tr&gt;
              &lt;/thead&gt;
  
              &lt;tbody&gt;
  
              &lt;?php foreach ($available_variations as $prod_variation) : ?&gt;
  
                  &lt;?php
                      // get some vars to work with
                      $post_id = $prod_variation['variation_id'];
                      $post_object = get_post($post_id);
                  ?&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;?php echo $prod_variation['sku']; ?&gt;&lt;/td&gt;
  
                  &lt;?php foreach ($prod_variation['attributes'] as $attr_name =&gt; $attr_value) : ?&gt;
                      &lt;td&gt;&lt;?php echo $attr_value; ?&gt;&lt;/td&gt;
                  &lt;?php endforeach;?&gt;
  
                      &lt;td class="uom"&gt;&lt;?php echo the_field( 'uom' ); ?&gt;&lt;/td&gt;
  
                  &lt;/tr&gt;
              &lt;?php endforeach;?&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;?php
      // END CHECK IF VARIATIONS ARE PRESENT
      endif;
  endif;
  ?&gt;
  &lt;!-- ******* END PRODUCT VARIABLE TABLE SECTION ******* --&gt;
  </code></pre>
  
  <p>Does anyone know how I can pull the Variable label (not just the slug, replacing dashes with spaces using str_replace() )?</p>