WooCommerce – set session with new cart item meta when updating cart item quantity [closed]


SOLVED

This is how I did it.

Getting the cart content.

$cart_content = WC()->cart->cart_contents;

Replacing the cart item with the new updated version.

$cart_content[$cart_item_key] = $cart_item;

This here made the change. Setting the updated cart content.

WC()->cart->set_cart_contents($cart_content);

tech