title: Get WooCommerce product variation attribute terms in admin products general box
body: <p>I display the id and sku of <strong>each</strong> variable product in the general tab - of the wp admin product data box with the following code. Any idea how to get the the variable product attribute name too - in this case &quot;test 1&quot; and &quot;test 2&quot;?</p>
  <p><strong>The variations</strong></p>
  <p><a href="https://i.stack.imgur.com/TauHw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TauHw.png" alt="enter image description here" /></a></p>
  <p><strong>The general tab</strong></p>
  <p><a href="https://i.stack.imgur.com/5pbgD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5pbgD.png" alt="enter image description here" /></a></p>
  <p><strong>The code</strong></p>
  <pre><code>&lt;?php   
      add_action( 'woocommerce_product_options_general_product_data', 'echo_product_id_sku_general_tab' );
      function echo_product_id_sku_general_tab() {
          
          $children_ids = wc_get_product()-&gt;get_children();
          $count        = 0;
          
          // Loop through the variations Ids
          foreach( $children_ids as $child_id ) {
  
              $count++;
              $pr_id_variable = wc_get_product($child_id)-&gt;get_id();
              $pr_sku_variable = wc_get_product($child_id)-&gt;get_sku();
              
          ?&gt;
  
          &lt;p class=&quot;form-field&quot;&gt;
              &lt;label&gt;&lt;?php _e( 'Variation', 'woocommerce' ); ?&gt; &lt;?php echo $count; ?&gt; ID&lt;/label&gt;
              &lt;input type=&quot;text&quot; value=&quot;ID&lt;?php echo $pr_id_variable; ?&gt;&quot;&gt;&lt;/input&gt;
          &lt;/p&gt;            
          
          &lt;p class=&quot;form-field&quot;&gt;
              &lt;label&gt;&lt;?php _e( 'Variation', 'woocommerce' ); ?&gt; &lt;?php echo $count; ?&gt; SKU&lt;/label&gt;
              &lt;textarea&gt;&lt;?php echo $pr_sku_variable; ?&gt;&lt;/textarea&gt;
          &lt;/p&gt;    
          
          &lt;?php } ?&gt;
  &lt;?php } ?&gt;
  </code></pre>