1

Im trying to export and import my WooCommerce product across platforms. I use the standard WooCommerce product export and the Produkt Feed Pro for my Feeds. The exported Products have meta-data like:

Meta: _woosea_brand Meta: _woosea_mpn Meta: _woosea_upc Meta: _woosea_ean Meta: _woosea_gtin Meta: _woosea_color Meta: _woosea_size Meta: _woosea_gender

Now I want to add, save and edit this meta data in edit product backend. So if I go to the product edit backend I can manually enter and save the value of this field for example: _woosea_gender = "unisex, male, female". and save the meta data. So in the next export I get the adjusted meta data.

I looked into some some plugins(but they seem outdated): https://wordpress.org/plugins/wc-fields-factory/

This post is also coming close to what I want to do I tired to adjust it to my needs but it did nit worked.

Updating product post meta data in admin meta box field

editing: _woosea_age_group(I need to add this values: (newborn, infant, toddler, kids, adult)

// 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_deal_general_fields_save' );

function woo_add_custom_general_fields() {

  global $woocommerce, $post;

$feature_product=get_post_meta(get_the_ID(), '_woosea_age_group', true );
 if($feature_product=='yes'){

  echo '<div class="options_group">';

  // Custom fields will be created here...
  // Textarea
woocommerce_wp_textarea_input( 
    array( 
        'id'          => '_woosea_age_group', 
        'label'       => __( 'Age Group', 'woocommerce' ), 
        'placeholder' => '', 
        'description' => __( 'Enter the Deal Product Text value here. (will be shown on home page)', 'woocommerce' ) 
    )
);
  echo '</div>';
 }

}

Any advice on how to correctly set WooCommerce product meta data is more then welcome.

Best Regards.

Falko
  • 11
  • 1

0 Answers0