Skip to content

Commit d87e61b

Browse files
committed
Fixed null net terms
1 parent 3aef083 commit d87e61b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/hooks/CheckoutPaymentMethod.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ private function getAllowedNetTerms()
160160
return [];
161161
}
162162

163-
$netTerms = array_map(function ($paymentMethod) {
163+
$netTerms = array_unique(array_filter(array_map(function ($paymentMethod) {
164164
if ($this->getBuyerCountryCode() == $paymentMethod['country_code']){
165165
return $paymentMethod['net_term'];
166166
}
167-
}, $allowedNetTerms['payment_terms']);
167+
}, $allowedNetTerms['payment_terms'])));
168168

169169
$this->setMonduNetTermsCache($netTerms);
170170

0 commit comments

Comments
 (0)