Skip to content

Commit 45bdc63

Browse files
Merge branch 'bugfix/check-if-the-quote-is-active' into release-week-22-2
2 parents c7adcda + 1de2078 commit 45bdc63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Mollie_HyvaCheckout/Observer/SalesQuoteCollectTotalsBefore/SetDefaultSelectedPaymentMethod.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public function execute(Observer $observer): void
5050
/** @var Quote $quote */
5151
$quote = $observer->getData('quote');
5252

53-
// Don't override if a payment method is already set.
54-
if ($this->quoteHasActivePaymentMethod($quote)) {
53+
// Don't override if the quote isn't available yet or if a payment method is already set.
54+
if (!$quote->getId() || $this->quoteHasActivePaymentMethod($quote)) {
5555
return;
5656
}
5757

0 commit comments

Comments
 (0)