How can i create a WooCommerce product programatically or using sql query?
This will give you a base to start: function generate_simple_product() { $name=”My Product Name”; $will_manage_stock = true; $is_virtual = false; $price = 1000.00; $is_on_sale = true; $sale_price = 999.00; $product = new \WC_Product(); $image_id = 0; // Attachment ID $gallery = self::maybe_get_gallery_image_ids(); $product->set_props( array( ‘name’ => $name, ‘featured’ => false, ‘catalog_visibility’ => ‘visible’, ‘description’ => … Read more