diff --git a/Model/Service/OrderHandlerService.php b/Model/Service/OrderHandlerService.php index f4c8d6ba..a5bfd4e4 100644 --- a/Model/Service/OrderHandlerService.php +++ b/Model/Service/OrderHandlerService.php @@ -221,14 +221,14 @@ public function findOrderByFields($fields) $value ); } - + $this->searchBuilder->setPageSize(1); + // Create the search instance $search = $this->searchBuilder->create(); // Get the resulting order $order = $this->orderRepository ->getList($search) - ->setPageSize(1) ->getLastItem(); if ($order->getId()) {