/** * Performs all processes to be performed after the order creation. * * Flushes all loaded order and related entities. * * @param CartInterface $cart Cart */ public function loadCartShippingAmount(CartInterface $cart) { $shippingMethodId = $cart->getShippingMethod(); if (empty($shippingMethodId)) { return; } $shippingMethod = $this->shippingWrapper->getOneById($cart, $shippingMethodId); if ($shippingMethod instanceof ShippingMethod) { $cart->setShippingAmount($shippingMethod->getPrice()); } }