mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
phpcs
This commit is contained in:
parent
d96f4593a6
commit
ddbecfe7f1
2 changed files with 38 additions and 9 deletions
|
@ -117,13 +117,41 @@ class CreditCardGateway extends PayPalGateway
|
|||
}
|
||||
|
||||
$titleOptions = [
|
||||
'visa' => _x('Visa', 'Name of credit card', 'woocommerce-paypal-commerce-gateway'),
|
||||
'mastercard' => _x('Mastercard', 'Name of credit card', 'woocommerce-paypal-commerce-gateway'),
|
||||
'amex' => _x('American Express', 'Name of credit card', 'woocommerce-paypal-commerce-gateway'),
|
||||
'discover' => _x('Discover', 'Name of credit card', 'woocommerce-paypal-commerce-gateway'),
|
||||
'jcb' => _x('JCB', 'Name of credit card', 'woocommerce-paypal-commerce-gateway'),
|
||||
'elo' => _x('Elo', 'Name of credit card', 'woocommerce-paypal-commerce-gateway'),
|
||||
'hiper' => _x('Hiper', 'Name of credit card', 'woocommerce-paypal-commerce-gateway'),
|
||||
'visa' => _x(
|
||||
'Visa',
|
||||
'Name of credit card',
|
||||
'woocommerce-paypal-commerce-gateway'
|
||||
),
|
||||
'mastercard' => _x(
|
||||
'Mastercard',
|
||||
'Name of credit card',
|
||||
'woocommerce-paypal-commerce-gateway'
|
||||
),
|
||||
'amex' => _x(
|
||||
'American Express',
|
||||
'Name of credit card',
|
||||
'woocommerce-paypal-commerce-gateway'
|
||||
),
|
||||
'discover' => _x(
|
||||
'Discover',
|
||||
'Name of credit card',
|
||||
'woocommerce-paypal-commerce-gateway'
|
||||
),
|
||||
'jcb' => _x(
|
||||
'JCB',
|
||||
'Name of credit card',
|
||||
'woocommerce-paypal-commerce-gateway'
|
||||
),
|
||||
'elo' => _x(
|
||||
'Elo',
|
||||
'Name of credit card',
|
||||
'woocommerce-paypal-commerce-gateway'
|
||||
),
|
||||
'hiper' => _x(
|
||||
'Hiper',
|
||||
'Name of credit card',
|
||||
'woocommerce-paypal-commerce-gateway'
|
||||
),
|
||||
];
|
||||
$images = array_map(
|
||||
function (string $type) use ($titleOptions): string {
|
||||
|
|
|
@ -69,8 +69,9 @@ class SettingsListener
|
|||
&& absint($_POST['woocommerce_ppcp-gateway_enabled']) === 1;
|
||||
}
|
||||
if ($_GET['section'] === CreditCardGateway::ID) {
|
||||
$settings['dcc_gateway_enabled'] = isset($_POST['woocommerce_ppcp-credit-card-gateway_enabled'])
|
||||
&& absint($_POST['woocommerce_ppcp-credit-card-gateway_enabled']) === 1;
|
||||
$dccEnabledPostKey = 'woocommerce_ppcp-credit-card-gateway_enabled';
|
||||
$settings['dcc_gateway_enabled'] = isset($_POST[$dccEnabledPostKey])
|
||||
&& absint($_POST[$dccEnabledPostKey]) === 1;
|
||||
}
|
||||
$this->maybeRegisterWebhooks($settings);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue