Skip to content

Commit

Permalink
Fix cs and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaymo committed Jul 19, 2024
1 parent da8bbae commit e9534af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Payment/MollieOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1002,11 +1002,11 @@ protected function getCustomerBirthdate($order)
if (!$gateway || !isset($gateway->id)) {
return null;
}
if(strpos($gateway->id, 'mollie_wc_gateway_') === false){
if (strpos($gateway->id, 'mollie_wc_gateway_') === false) {
return null;
}
$additionalFields = $gateway->paymentMethod()->getProperty('additionalFields');
$methodId = in_array('birthdate', $additionalFields, true);
$methodId = $additionalFields && in_array('birthdate', $additionalFields, true);
if ($methodId) {
//phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
$fieldPosted = wc_clean(wp_unslash($_POST["billing_birthdate"] ?? ''));
Expand Down
2 changes: 1 addition & 1 deletion src/Payment/PaymentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ protected function processAsMollieOrder(
'mollie_wc_gateway_klarna',
'mollie_wc_gateway_billie',
'mollie_wc_gateway_in3',
'mollie_wc_gateway_riverty'
'mollie_wc_gateway_riverty',
];

if (in_array($order_payment_method, $orderMandatoryPaymentMethods, true)) {
Expand Down

0 comments on commit e9534af

Please sign in to comment.