Skip to content

Commit f95f7cf

Browse files
committed
Merge remote-tracking branch 'origin/AC-13878' into spartans_pr_25022025
2 parents 76f8a43 + 53da18a commit f95f7cf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/code/Magento/Paypal/Controller/Express/AbstractExpress.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2015 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\Paypal\Controller\Express;
77

@@ -151,6 +151,9 @@ public function __construct(
151151
protected function _initCheckout(?CartInterface $quoteObject = null)
152152
{
153153
$quote = $quoteObject ? $quoteObject : $this->_getQuote();
154+
if ($quote->getId()) {
155+
$this->_getCheckoutSession()->setPayPalQuoteId($quote->getId());
156+
}
154157
if (!$quote->hasItems() || $quote->getHasError()) {
155158
$this->getResponse()->setStatusHeader(403, '1.1', 'Forbidden');
156159
throw new \Magento\Framework\Exception\LocalizedException(__('We can\'t initialize Express Checkout.'));
@@ -248,6 +251,9 @@ protected function _getQuote()
248251
$this->_getCheckoutSession()->replaceQuote($this->_quote);
249252
} else {
250253
$this->_quote = $this->_getCheckoutSession()->getQuote();
254+
if (!$this->_quote->getId() && $this->_getCheckoutSession()->getPayPalQuoteId()) {
255+
$this->_quote = $this->quoteRepository->get($this->_getCheckoutSession()->getPayPalQuoteId());
256+
}
251257
}
252258
}
253259
return $this->_quote;

0 commit comments

Comments
 (0)