Creating a new simple product in WooCommerce

$product = new WC_Product_Simple();
$product->set_name( 'My Product' );
$product->set_slug( 'myproduct' );
$product->set_description( 'A new simple product' );
$product->set_regular_price( '9.50' );
$product->save();

$product_id = $product->get_id();
wela-ernestina@mailxu.com scotlandsqc@mailxu.com