/**
  * Adds the panel to the Product Data postbox in the product interface
  */
 public function product_write_panel()
 {
     global $post;
     // Pull the field data out of the database
     $available_fields = array();
     $available_fields[] = maybe_unserialize(get_post_meta($post->ID, 'wc_productdata_options', true));
     if ($available_fields) {
         // Display fields panel
         foreach ($available_fields as $available_field) {
             echo '<div id="wc_productdata_options_tab" class="panel woocommerce_options_panel">';
             $fields = wc_custom_product_data_fields();
             foreach ($fields as $field) {
                 if (!isset($field['tab_name'])) {
                     WC_Product_Data_Fields::wc_product_data_options_fields($field);
                 }
             }
             echo '</div>';
         }
     }
 }
 /**
  * Adds the panel to the Product Data postbox in the product interface
  *
  * @return string
  */
 public function product_write_panel()
 {
     global $post;
     // Pull the field data out of the database
     $available_fields = array();
     $available_fields[] = maybe_unserialize(get_post_meta($post->ID, 'wc_productdata_options', true));
     if ($available_fields) {
         // Display fields panel
         foreach ($available_fields as $available_field) {
             $fields = $this->wc_cpdf_fields();
             if ($fields == null) {
                 return;
             }
             foreach ($fields as $key => $fields_array) {
                 echo '<div id="' . $key . '" class="panel woocommerce_options_panel wc_cpdf_tab">';
                 foreach ($fields_array as $field) {
                     if (!$field['tab_name']) {
                         WC_Product_Data_Fields::wc_product_data_options_fields($field);
                     }
                 }
                 echo '</div>';
             }
         }
     }
 }