"Order items" view displaying removed items (variations)?
foreach ($items as $item) {
  $quantity = $item-&gt;getQuantity();
  $itemVariationId = $item-&gt;getPurchasedEntity()-&gt;id();
  if ($variationId == $itemVariationId){
    foreach ($orders as $order) {
      $cart_manager = \Drupal::service('commerce_cart.cart_manager');
      $cart_manager-&gt;removeOrderItem($order, $item);
    }
    return $quantity;
  }
}
// return 0; &lt;-- not necessary, functions don't have to always return.