Adding a Product Variation to your WooCommerce Cart Programatically code example Example: add a item to cart woocomerce with quantity WC()->cart->add_to_cart( 500, 5 );