Skip to content

Commit 18601a0

Browse files
committed
MCP-792: Wrong error message is sent in email if order is rejected because of disabled product
1 parent ef16fdd commit 18601a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function savePaymentInformationAndPlaceOrder(
120120
//Have to do this hack because of savePaymentInformation() plugins.
121121
$this->saveRateLimitDisabled = true;
122122
$this->savePaymentInformation($cartId, $email, $paymentMethod, $billingAddress);
123-
} catch (\Magento\Framework\Exception\LocalizedException $e) {
123+
} catch (\Magento\Framework\Exception\CouldNotSaveException $e) {
124124
$this->getLogger()->critical(
125125
'Placing an order with quote_id ' . $cartId . ' is failed: ' . $e->getMessage()
126126
);
@@ -184,7 +184,7 @@ public function savePaymentInformation(
184184
}
185185
$this->limitShippingCarrier($quote);
186186

187-
if (!$quote->getItemsQty()) {
187+
if (!(int)$quote->getItemsQty()) {
188188
throw new CouldNotSaveException(__('Some of the products are disabled.'));
189189
}
190190

0 commit comments

Comments
 (0)