I\'m using this function to add product variations to the cart programmatically.
function add_to_cart($product_id, $variation_id, $variation_data) { global $