Skip to content

Commit a958585

Browse files
authored
Fix outdated shipping addr overwritten paypal addr
PayPal One Click should only use the addresses returned from PayPal
1 parent d28b5d0 commit a958585

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app/code/Magento/Braintree/Model/Paypal/Helper/QuoteUpdater.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ private function updateQuote(Quote $quote, array $details)
8484

8585
$quote->collectTotals();
8686

87+
/**
88+
* Unset shipping assignment to prevent from saving / applying outdated data
89+
* @see \Magento\Quote\Model\QuoteRepository\SaveHandler::processShippingAssignment
90+
*/
91+
if ($quote->getExtensionAttributes()) {
92+
$quote->getExtensionAttributes()->setShippingAssignments(null);
93+
}
94+
8795
$this->quoteRepository->save($quote);
8896
}
8997

0 commit comments

Comments
 (0)