Insert a Woocomerce product in specific product category
You can use wp_set_object_terms fx From Codex: This function relates an object (post, link etc) to a term and taxonomy type (tag, category, etc). Creates the term and taxonomy relationship if it doesn’t already exist. wp_set_object_terms( ‘id of product’, ‘term name’, ‘product_cat’, true );