Skip to content

Commit

Permalink
Make order identification more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Dec 21, 2023
1 parent a36afb7 commit 9730b32
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Model/GiftCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,17 @@ public function getOrderIdentification(): ?array
return null;
}

/** @var mixed $orderId */
$orderId = $order->getId();
$orderNumber = $order->getNumber();

if (null === $orderId || null === $orderNumber) {
return null;
}

return [
'id' => $order->getId(),
'number' => $order->getNumber(),
'id' => $orderId,
'number' => $orderNumber,
];
}

Expand Down

0 comments on commit 9730b32

Please sign in to comment.