title: WooCommerce : add custom fields to product variations
body: <p>I need help adding custom fields to my Product Variations and Simple Product pages. I tried using RemiCorson's info (<a href="http://www.remicorson.com/woocommerce-custom-fields-for-variations/" rel="nofollow noreferrer">http://www.remicorson.com/woocommerce-custom-fields-for-variations/</a>), but I keep getting an error. I tried to duplicate what I saw in <a href="https://stackoverflow.com/questions/24720977/woocommerce-custom-fields-wont-update-when-i-leave-them-empty-and-still-display">this user's posts for ISBN</a> but it's not working for me.</p>
  
  <p>The problem with the code below is that it doesn't show up on the live site. All help is greatly appreciated, I've spent most of today trying to figure out what I'm doing wrong. </p>
  
  <p>Adding 6 custom text fields and 1 check box to both Simple Product and Variable Product pages in Woocommerce. These are not fields to be supplied (i.e. filled out) by the shopper, but rather custom information I want displayed on my product pages (and NOT within a tab).</p>
  
  <pre><code>// Display Fields
  add_action( 'woocommerce_product_options_general_product_data', 'woo_add_custom_general_fields' );
  
  // Save Fields
  add_action( 'woocommerce_process_product_meta', 'woo_add_custom_general_fields_save' );
  
  function woo_add_custom_general_fields() {
  
    global $woocommerce, $post;
  
    echo '&lt;div class="options_group"&gt;';
  
    // Custom fields will be created here...
  
  // Text Field
  woocommerce_wp_text_input( 
      array( 
          'id'          =&gt; '_ISBN_field', 
          'label'       =&gt; __( 'ISBN', 'woocommerce' ), 
          'placeholder' =&gt; '',
          'desc_tip'    =&gt; 'true',
          'description' =&gt; __( 'ISBN.', 'woocommerce' ) 
      )
  );
  function woo_add_custom_general_fields_save( $post_id ){
  
  // Customer text ISBN Field
  $woocommerce_text_field = $_POST['_ISBN_field'];
  if( !empty( $woocommerce_text_field ) )
      update_post_meta( $post_id, '_ISBN_field', esc_attr( $woocommerce_text_field ) );
  else
      update_post_meta( $post_id, '_ISBN_field', '' );
  }
  // Display Custom Field Value
  echo get_post_meta( $post-&gt;ID, '_ISBN_field', true );
  
  }
  /* WooCommerce */
  
  /* ----------------------------------------------------------------------------------- */
  /* Start WooThemes Functions - Please refrain from editing this section */
  /* ----------------------------------------------------------------------------------- */
  </code></pre>