Hy guys. I have three product in my cart. Let's try to imagine that the image is the cart and i have modify the quantity of product and then press update cart.
When i press update cart, my function runs, than prints all my item after modify, into ITEMS.json. There are all my items and with the quantity modify of the Shoes, but into my file there is also Hoodie with quantity = 3. How is it possible that i delete it? it and i print items after update cart.
add_action('woocommerce_after_cart_item_quantity_update','my_function');
function my_function()
{
global $woocommerce;
$items = $woocommerce->cart->get_cart();
file_put_contents('ITEMS.json', print_r($items, true));
}
Is there something to distinguish the products delete from product modify?
Is there a hook which returns the list of products deleted ?