title: Shortcode displaying product attributes list in WooCommerce single products
body: <p>So I've been struggling to find any information on this and can't see any obvious way of doing it. I want to have a table in the product description listing certain attributes that I have set.</p>
  <p>So for example in the description, I would have Title A followed by some text and a table with attributes 1, 2, and 3 then under Title B some text and attributes 4, 5, and 6.</p>
  <p>I figured the easy way to do this would be to create a shortcode so I have tried and clearly missed something vital as it is not showing anything at all when I use it.</p>
  <pre><code>add_action( 'woocommerce_single_product_summary', 'show_attribute_group_a', 45 );
  
  add_shortcode( 'show_attributes_a', 'show_attribute_group_a' );
  function show_attribute_group_a() {
      global $product;
      $attribute1 = $product-&gt;get_attribute('attribute1');
      $attribute2 = $product-&gt;get_attribute('attribute2');
      ?&gt;
      &lt;table class=&quot;&quot;&gt;
          &lt;tr class=&quot;&quot;&gt;
              &lt;th class=&quot;&quot;&gt;Attribute 1&lt;/th&gt;
              &lt;td class=&quot;&quot;&gt;&lt;?php echo $attribute1; ?&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr class=&quot;&quot;&gt;
              &lt;th class=&quot;&quot;&gt;Attribute 2&lt;/th&gt;
              &lt;td class=&quot;&quot;&gt;&lt;?php echo $attribute2; ?&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
      &lt;?php
  }
  </code></pre>
  <p>So where I have tried to pull the attributes I have used the slug of the attribute is that correct? But still, I would expect to see an empty table even if that part was wrong. There's obviously something fundamentally wrong and I can't see what.</p>