title: Custom Woocommerce product variations attributes
body: <p>I’ve seen similar questions asked, and have tried all the solutions, but none of them seems to work for my project.</p>
  
  <p>All my products have extra specifications, that needs to change when the customer choose a different variation on the product page. And I need the specifications to be displayed in the products attributes table
  So far, I’ve tried a couple of different things, but my code so far looks like this. I can get the extra data to save from the edit product page, but I can’t figure out how to get it to display on the product page.</p>
  
  <p>Functions.php</p>
  
  <pre><code>// Add custom fields to product variation settings
  add_action( 'woocommerce_product_after_variable_attributes','add_variation_options_other_dimensions', 10, 3 );
  function add_variation_options_other_dimensions( $loop, $variation_data, $variation ){
  
  
      woocommerce_wp_text_input( array(
          'id' =&gt; 'diameter[' . $loop . ']',
          'class' =&gt; 'short',
          'label'       =&gt; __( 'Diameter', 'woocommerce' ),
          'desc_tip'    =&gt; 'true',
          'description' =&gt; __( 'Diameter description help.', 'woocommerce' ),
          'value'       =&gt; get_post_meta( $variation-&gt;ID, 'diameter', true )
      ) );
  
      woocommerce_wp_text_input( array(
          'id' =&gt; 'thickness[' . $loop . ']',
          'class' =&gt; 'short',
          'label'       =&gt; __( 'Thickness', 'woocommerce' ),
          'desc_tip'    =&gt; 'true',
          'description' =&gt; __( 'Thickness description help.', 'woocommerce' ),
          'value'       =&gt; get_post_meta( $variation-&gt;ID, 'thickness', true )
      ) );
  
  }
  
  
  // Save product variation custom fields values
  add_action( 'woocommerce_save_product_variation','save_variation_options_other_dimensions', 10 ,2 );
  function save_variation_options_other_dimensions( $variation_id, $i ) {
  
      $diameter = $_POST["diameter"][$i];
      if ( isset( $diameter ) )
          update_post_meta( $variation_id, 'diameter', esc_attr( $diameter ) );
  
      $thickness = $_POST["thickness"][$i];
      if ( isset( $thickness ) )
          update_post_meta( $variation_id, 'thickness', esc_attr( $thickness ) );
  
  }
  </code></pre>
  
  <p>I’ve tried displaying the values in “product-attributes.php” and “additional-information.php” seeing as I want the new values to be displayed along side the original attributes.</p>
  
  <p>My product-attributes-php</p>
  
  <pre><code>&lt;?php echo get_post_meta( $product-&gt;get_id(), 'diameter', true ); ?&gt;
  &lt;?php echo get_post_meta( $product-&gt;get_id(), 'thickness', true ); ?&gt;
  
  </code></pre>
  
  <p>Is there anyway to display these values in either the product attribute table or right after it in the additional information tab, on the product page?</p>
  
  <p>Sorry in advance if my question is dumb, it's my first time posting. And I just can't get it working</p>