diff --git a/src/Core/Api/Transaction/Service/TransactionService.php b/src/Core/Api/Transaction/Service/TransactionService.php index edb7f35..2892c57 100644 --- a/src/Core/Api/Transaction/Service/TransactionService.php +++ b/src/Core/Api/Transaction/Service/TransactionService.php @@ -310,6 +310,9 @@ private function holdDelivery(string $orderId, Context $context) */ $orderEntity = $this->getOrderEntity($orderId, $context); $orderDeliveryStateHandler = $this->container->get(OrderDeliveryStateHandler::class); + if (null !== $orderEntity->getDeliveries()->last()) { + $orderDeliveryStateHandler->hold($orderEntity->getDeliveries()->last()->getId(), $context); + } $orderDeliveryStateHandler->hold($orderEntity->getDeliveries()->last()->getId(), $context); } catch (\Exception $exception) { $this->logger->critical($exception->getTraceAsString());