WooCommerce, manually add a product and price for purchase WooCommerce, manually add a product and price for purchase wordpress wordpress

WooCommerce, manually add a product and price for purchase


here is example

global $woocommerce;$woocommerce->cart->add_to_cart(16);

16 -> this is ID of existing product in store

documentation Link