Skip to content

Commit

Permalink
Pt 1020 Bugfix for ProcessShipmentSave (#101)
Browse files Browse the repository at this point in the history
Co-authored-by: Ivan Pugach <[email protected]>
  • Loading branch information
tikohov20 and ivan-pugach-mondu authored Feb 15, 2024
1 parent 52d7848 commit b5b4699
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions Plugin/ProcessShipmentSave.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -64,7 +71,6 @@ public function afterSave(
return $shipment;
}

$monduId = $order->getData('mondu_reference_id');
$this->monduLogger->syncOrder($monduId);

if (!$this->monduLogger->canShipOrder($monduId)) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
Expand Down

0 comments on commit b5b4699

Please sign in to comment.