diff --git a/Model/Api/OrdersApi.php b/Model/Api/OrdersApi.php index 4e771b4..b50f55d 100644 --- a/Model/Api/OrdersApi.php +++ b/Model/Api/OrdersApi.php @@ -6,6 +6,7 @@ use Emartech\Emarsys\Api\Data\OrdersApiResponseInterfaceFactory; use Emartech\Emarsys\Api\OrdersApiInterface; use Magento\Framework\Webapi\Exception as WebApiException; +use Magento\Sales\Model\Order; use Magento\Sales\Model\ResourceModel\Order\Collection as OrderCollection; use Magento\Sales\Model\ResourceModel\Order\CollectionFactory as OrderCollectionFactory; @@ -144,7 +145,9 @@ private function handleItems(): array { $returnArray = []; + /** @var Order $order */ foreach ($this->orderCollection as $order) { + $order->setStoreName(str_replace(PHP_EOL, ' ', $order->getStoreName())); $returnArray[] = $order; }