title: WooCommerce cart product delete/update
body: <p>I have changed my add to cart function to include two products from one product-page.
  If two products are added they will both get a bundle_id, and when I delete from cart then both products gets removed, but when I undo, only one product returns to the cart.
  My remove function:</p>
  <pre><code>add_action( 'woocommerce_cart_item_removed', 'cart_remove_func', 10, 2 );
  function cart_remove_func($removed_cart_item_key, $cart) {
      $line_item = $cart-&gt;removed_cart_contents[ $removed_cart_item_key ];
      $bundle_id = $line_item[ 'bundle_id' ];
              
      foreach( WC()-&gt;cart-&gt;get_cart() as $key =&gt; $item ){
          // Check if the item to be removed 1 is in cart
          if( $item['bundle_id'] == $bundle_id ){
              WC()-&gt;cart-&gt;remove_cart_item($key);
          }
      }
  }
  </code></pre>
  <p>I have tried to add the newly deleted item to the <code>removed_cart_contents</code> array, but this didn't seem to work.</p>
  <p>Can I add the extra deleted item to the <code>removed_cart_contents</code> array so the &quot;undo&quot; add both products back to the cart?</p>
  <hr />
  <p>As for the cart-update:
  When I update the quantity of an item with <code>bundle_id</code> then both products should be set to the same amount. I have tried to use <code>woocommerce_update_cart_action_cart_updated</code> hook, but all I managed to do here was to show a blanc page and also deleting all products in the cart (not the intention, obviously).</p>
  <p>How can I update the quantity of a product with the same bundle_id as the updated product?</p>