Create programmatically a WooCommerce product variation with new attribute values
I have created a variable product ("parent" product) in WooCommerce version 3+. From a WordPress plugin, I would like to programmatically create the product variations ("children" product) with new attribute values. The variation attributes are already set in WooCommerce. So every time one variation is created, the new attribute's values should be created programmatically too and set in the parent Variable product. How can this be done? is it possible? Update : I had written more lines of codes on this that I wished, and tried many things to solve it, using woocommerce objects, and added