diff --git a/Plugin/GraphQlPlaceOrderAddCartId.php b/Plugin/GraphQlPlaceOrderAddCartId.php index ee360eb04..bf88af05b 100644 --- a/Plugin/GraphQlPlaceOrderAddCartId.php +++ b/Plugin/GraphQlPlaceOrderAddCartId.php @@ -59,6 +59,10 @@ public function __construct( */ public function afterResolve(PlaceOrder $placeOrder, array $result): array { + if (!isset($result['order'])) { + return $result; + } + try { $cart = $this->quoteHelper->getQuoteByOrderIncrementId($result['order']['order_number']); $maskedId = $this->quoteIdToMaskedQuoteId->execute($cart->getId());