From c7b84603d4d173e6492bb93d5f4a8e58b218054e Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Sun, 15 Sep 2024 16:33:39 +0200 Subject: [PATCH] Bugfix woocommerce ImportUpdateAuftrag tracking --- www/pages/shopimporter_woocommerce.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/pages/shopimporter_woocommerce.php b/www/pages/shopimporter_woocommerce.php index 8e2bc802..08820672 100644 --- a/www/pages/shopimporter_woocommerce.php +++ b/www/pages/shopimporter_woocommerce.php @@ -426,7 +426,9 @@ class Shopimporter_Woocommerce extends ShopimporterBase if ($data->orderStatus !== OrderStatus::Completed) return; - $trackingCode = $data->shipments[0]?->trackingNumber; + if (isset($data->shipments)) { + $trackingCode = $data->shipments[0]?->trackingNumber; + } if (!empty($trackingCode)) { $this->client->post('orders/'.$data->shopOrderId.'/notes', [ @@ -446,7 +448,7 @@ class Shopimporter_Woocommerce extends ShopimporterBase 'meta_data' => [ [ 'key' => 'tracking_code', - 'value' => $data->shipments[0]?->trackingNumber + 'value' => $trackingCode ], [ 'key' => 'shipping_carrier',