From b5b46995f49a7a9e01563dd3414519f518a56f50 Mon Sep 17 00:00:00 2001 From: Tigran <62335544+tikohov20@users.noreply.github.com> Date: Thu, 15 Feb 2024 17:00:49 +0400 Subject: [PATCH] Pt 1020 Bugfix for ProcessShipmentSave (#101) Co-authored-by: Ivan Pugach --- Plugin/ProcessShipmentSave.php | 10 ++++++++-- composer.json | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Plugin/ProcessShipmentSave.php b/Plugin/ProcessShipmentSave.php index 16247f8..b8635d1 100644 --- a/Plugin/ProcessShipmentSave.php +++ b/Plugin/ProcessShipmentSave.php @@ -52,7 +52,14 @@ public function afterSave( $shipment ) { $order = $shipment->getOrder(); - $monduLog = $this->monduLogger->getLogCollection($order->getData('mondu_reference_id')); + + $monduId = $order->getData('mondu_reference_id'); + + if(!$monduId) { + return $shipment; + } + + $monduLog = $this->monduLogger->getLogCollection($monduId); if ($monduLog->getSkipShipObserver()) { $this->monduFileLogger @@ -64,7 +71,6 @@ public function afterSave( return $shipment; } - $monduId = $order->getData('mondu_reference_id'); $this->monduLogger->syncOrder($monduId); if (!$this->monduLogger->canShipOrder($monduId)) { diff --git a/composer.json b/composer.json index e440888..618bfa7 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "mondu_gmbh/magento2-payment", "description": "Mondu payment method for magento 2", "type": "magento2-module", - "version": "2.3.4-RC1", + "version": "2.3.4-RC2", "license": [ "MIT" ],