title: Display "in stock" product variation custom attribute values in WooCommerce category archives
body: <p>I have a store with woocommerce and I want to show the available size at the category page. I did that, but I want sizes not in stock to not show. In this moment on category page are listed all sizes assigned to the product. I want to display only the ones that have variations asigned to them that are in stock.</p>
  
  <p>I tried adding more attributes to <strong><code>wc_get_product_terms</code></strong> but with no success. This is the current code, working pretty well but it's not what I want:</p>
  
  <pre><code>add_action( 'woocommerce_after_shop_loop_item', 'custom_display_post_meta', 9 );
  
  function custom_display_post_meta() {
      global $product;
  
      //Doing this for more types of sizes, so list only if it's necesarry
      $size = $product-&gt;get_attribute('pa_size');
      if( $size )
      {
          $values = wc_get_product_terms( $product-&gt;id, 'pa_size', array( 'fields' =&gt; 'names' ) );
          echo implode( ', ', $values );
      }
  }
  </code></pre>
  
  <p>Is it possible?</p>