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 +}