Skip to content

Commit

Permalink
phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
inpsyde-maticluznar committed Oct 3, 2024
1 parent a00d2c4 commit f68de04
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
4 changes: 3 additions & 1 deletion src/Assets/AssetsModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,9 @@ function () use ($container, $hasBlocksEnabled, $pluginVersion, $dataService, $p
);
}

protected function enqueueMollieSettings(){
protected function enqueueMollieSettings()
{

$uri = isset($_SERVER['REQUEST_URI']) ? wc_clean(
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
wp_unslash($_SERVER['REQUEST_URI'])
Expand Down
2 changes: 1 addition & 1 deletion src/Buttons/ApplePayButton/ApplePayDataObjectHttp.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ protected function addressHasRequiredFieldsValues(
sprintf('ApplePay Data Error: Missing value for %s', $requiredField)
);
$this->errors[]
= [
= [
'errorCode' => $errorCode,
'contactField' => $errorValue,
];
Expand Down
48 changes: 24 additions & 24 deletions src/Settings/Page/Section/Notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ protected function warnDirectDebitStatus(): string
{
$hasCustomSepaSettings = $this->paymentMethods["directdebit"]->getProperty('enabled') !== false;
$isSepaEnabled = !$hasCustomSepaSettings || $this->paymentMethods["directdebit"]->getProperty(
'enabled'
) === 'yes';
'enabled'
) === 'yes';
$sepaGatewayAllowed = !empty($this->mollieGateways["mollie_wc_gateway_directdebit"]);

if (!($sepaGatewayAllowed && !$isSepaEnabled)) {
return '';
}
return $this->notice(
__(
"You have WooCommerce Subscriptions activated, but not SEPA Direct Debit. Enable SEPA Direct Debit if you want to allow customers to pay subscriptions with iDEAL and/or other 'first' payment methods.",
'mollie-payments-for-woocommerce'
)
__(
"You have WooCommerce Subscriptions activated, but not SEPA Direct Debit. Enable SEPA Direct Debit if you want to allow customers to pay subscriptions with iDEAL and/or other 'first' payment methods.",
'mollie-payments-for-woocommerce'
)
);
}

Expand All @@ -63,10 +63,10 @@ protected function warnAboutRequiredCheckoutFieldForBillie(): string
return '';
}
return $this->notice(
__(
'You have activated Billie. To accept payments, please make sure all default WooCommerce checkout fields are enabled and required. The billing company field is required as well. Make sure to enable the billing company field in the WooCommerce settings if you are using Woocommerce blocks.',
'mollie-payments-for-woocommerce'
)
__(
'You have activated Billie. To accept payments, please make sure all default WooCommerce checkout fields are enabled and required. The billing company field is required as well. Make sure to enable the billing company field in the WooCommerce settings if you are using Woocommerce blocks.',
'mollie-payments-for-woocommerce'
)
);
}

Expand All @@ -76,17 +76,17 @@ protected function warnAboutRequiredCheckoutFieldForKlarna(): string
return '';
}
return $this->notice(
sprintf(
sprintf(
/* translators: Placeholder 1: Opening link tag. Placeholder 2: Closing link tag. Placeholder 3: Opening link tag. Placeholder 4: Closing link tag. */
__(
'You have activated Klarna. To accept payments, please make sure all default WooCommerce checkout fields are enabled and required. For more information, go to %1$sKlarna Pay Later documentation%2$s or %3$sKlarna Slice it documentation%4$s',
'mollie-payments-for-woocommerce'
),
'<a href="https://github.com/mollie/WooCommerce/wiki/Setting-up-Klarna-Pay-later-gateway">',
'</a>',
'<a href=" https://github.com/mollie/WooCommerce/wiki/Setting-up-Klarna-Slice-it-gateway">',
'</a>'
)
__(
'You have activated Klarna. To accept payments, please make sure all default WooCommerce checkout fields are enabled and required. For more information, go to %1$sKlarna Pay Later documentation%2$s or %3$sKlarna Slice it documentation%4$s',
'mollie-payments-for-woocommerce'
),
'<a href="https://github.com/mollie/WooCommerce/wiki/Setting-up-Klarna-Pay-later-gateway">',
'</a>',
'<a href=" https://github.com/mollie/WooCommerce/wiki/Setting-up-Klarna-Slice-it-gateway">',
'</a>'
)
);
}

Expand All @@ -98,10 +98,10 @@ protected function warnMollieBankTransferNotBACS(): string
}

return $this->notice(
__(
'You have the WooCommerce default Direct Bank Transfer (BACS) payment gateway enabled in WooCommerce. Mollie strongly advices only using Bank Transfer via Mollie and disabling the default WooCommerce BACS payment gateway to prevent possible conflicts.',
'mollie-payments-for-woocommerce'
)
__(
'You have the WooCommerce default Direct Bank Transfer (BACS) payment gateway enabled in WooCommerce. Mollie strongly advices only using Bank Transfer via Mollie and disabling the default WooCommerce BACS payment gateway to prevent possible conflicts.',
'mollie-payments-for-woocommerce'
)
);
}

Expand Down

0 comments on commit f68de04

Please sign in to comment.