Setting Woocommerce Product Tags and Categories via Custom Frontend Form
Found out the built-in Wordpress function wp_set_object_terms
will handle this quite easily.
Below are some examples:
//SET THE PRODUCT CATEGORIESwp_set_object_terms($productID, array('Cat Name 1', 'Cat Name 2'), 'product_cat');//SET THE PRODUCT TAGSwp_set_object_terms($productID, array('tag1','tag2','tag3'), 'product_tag');