From fd4afb688b1194457d181272ade9d287bb8a2620 Mon Sep 17 00:00:00 2001 From: Steve Tentrop Date: Tue, 8 Oct 2024 11:13:35 +0200 Subject: [PATCH] Only add tracking url when package number is set --- src/Services/OrderTrackingService.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Services/OrderTrackingService.php b/src/Services/OrderTrackingService.php index cec54aa1f..5cded6629 100644 --- a/src/Services/OrderTrackingService.php +++ b/src/Services/OrderTrackingService.php @@ -98,9 +98,8 @@ public function getTrackingURLs(Order $order, $lang): array foreach ($packageNumbers as $packageNo) { $trackingURLs[] = $this->buildTrackingUrl($order, $trackingURL, $packageNo, $lang); } - } else { + } elseif(count($packageNumbers)) { $packageNumber = implode($delimiter, $packageNumbers); - $trackingURLs[] = $this->buildTrackingUrl($order, $trackingURL, $packageNumber, $lang); } } @@ -136,4 +135,4 @@ private function buildTrackingUrl(Order $order, string $trackingURL, string $pac $trackingURL ); } -} \ No newline at end of file +}