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
af99ab0647
commit
f0b6e362b7
2 changed files with 9 additions and 5 deletions
|
@ -17,13 +17,17 @@ class DisableGateways
|
|||
SessionHandler $sessionHandler,
|
||||
ContainerInterface $settings
|
||||
) {
|
||||
|
||||
$this->sessionHandler = $sessionHandler;
|
||||
$this->settings = $settings;
|
||||
}
|
||||
|
||||
public function handler(array $methods): array
|
||||
{
|
||||
if (! $this->settings->has('merchant_email') || ! is_email($this->settings->get('merchant_email'))) {
|
||||
if (
|
||||
! $this->settings->has('merchant_email')
|
||||
|| ! is_email($this->settings->get('merchant_email'))
|
||||
) {
|
||||
unset($methods[WcGateway::ID]);
|
||||
return $methods;
|
||||
}
|
||||
|
@ -31,8 +35,6 @@ class DisableGateways
|
|||
return $methods;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return [WcGateway::ID => $methods[WcGateway::ID]];
|
||||
}
|
||||
|
||||
|
|
|
@ -55,8 +55,10 @@ class WcGateway extends \WC_Payment_Gateway
|
|||
'Provide your customers with the PayPal payment system',
|
||||
'woocommerce-paypal-gateway'
|
||||
);
|
||||
$this->title = $this->config->has('title') ? $this->config->get('title') : $this->method_title;
|
||||
$this->description = $this->config->has('description') ? $this->config->get('description') : $this->method_description;
|
||||
$this->title = $this->config->has('title') ?
|
||||
$this->config->get('title') : $this->method_title;
|
||||
$this->description = $this->config->has('description') ?
|
||||
$this->config->get('description') : $this->method_description;
|
||||
|
||||
$this->init_form_fields();
|
||||
$this->init_settings();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue