title: Get custom product attributes in Woocommerce
body: <p>In Woocommerce, I am trying to get product custom attribute values but I fail miserably and I don't get anything.</p>
  
  <p>So I tried: </p>
  
  <pre><code>global $woocommerce, $post, $product;
  $res = get_post_meta($product-&gt;id);
  print_r(unserialize($res['_product_attributes'][0]));
  </code></pre>
  
  <p>And I'm getting this raw data:</p>
  
  <pre><code>[pa_koostis] =&gt; Array
          (
              [name] =&gt; pa_koostis
              [value] =&gt; 
              [position] =&gt; 0
              [is_visible] =&gt; 1
              [is_variation] =&gt; 0
              [is_taxonomy] =&gt; 1
          )
  </code></pre>
  
  <p>I know that there is a value because it is shown in the attribute section, but I just can't find a way to get it displayed with my custom code.</p>