My WooCommerce web shop is made of a multistep add-to-cart process, that adds a free product to cart when a step is skipped.
So I would like to remove that free products from cart on checkout page, once the selecting process is done and customer is going to pay his order.
I know that I have to use the WC_Cart method remove_cart_item( $cart_item_key )
in some hook. I have tried some hooks without success, for the moment.
My free products Ids are:
$free_products_ids = array(10,52,63,85);
How can I achieve this?
Thanks