mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
codestyle
This commit is contained in:
parent
c788341887
commit
9e2f1f4bf9
11 changed files with 27 additions and 26 deletions
|
@ -105,7 +105,7 @@ return array(
|
|||
$fields = $container->get( 'wcgateway.settings.fields' );
|
||||
$webhook_registrar = $container->get( 'webhook.registrar' );
|
||||
$state = $container->get( 'onboarding.state' );
|
||||
$cache = new Cache('ppcp-token');
|
||||
$cache = new Cache( 'ppcp-token' );
|
||||
return new SettingsListener( $settings, $fields, $webhook_registrar, $cache, $state );
|
||||
},
|
||||
'wcgateway.order-processor' => static function ( $container ): OrderProcessor {
|
||||
|
@ -531,7 +531,7 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'button_enabled' => array(
|
||||
'button_enabled' => array(
|
||||
'title' => __( 'Enable buttons on Checkout', 'paypal-payments-for-woocommerce' ),
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable on Checkout', 'paypal-payments-for-woocommerce' ),
|
||||
|
|
|
@ -73,8 +73,8 @@ class DisableGateways {
|
|||
unset( $methods[ CreditCardGateway::ID ] );
|
||||
}
|
||||
|
||||
if ( $this->settings->has('button_enabled') && ! $this->settings->get('button_enabled') && ! $this->session_handler->order()) {
|
||||
unset( $methods[ PayPalGateway::ID] );
|
||||
if ( $this->settings->has( 'button_enabled' ) && ! $this->settings->get( 'button_enabled' ) && ! $this->session_handler->order() ) {
|
||||
unset( $methods[ PayPalGateway::ID ] );
|
||||
}
|
||||
|
||||
if ( ! $this->needs_to_disable_gateways() ) {
|
||||
|
|
|
@ -174,7 +174,7 @@ class WcGatewayModule implements ModuleInterface {
|
|||
$dcc_applies = $container->get( 'api.helpers.dccapplies' );
|
||||
|
||||
$screen = ! function_exists( 'get_current_screen' ) ? (object) array( 'id' => 'front' ) : get_current_screen();
|
||||
if (! $screen) {
|
||||
if ( ! $screen ) {
|
||||
$screen = (object) array( 'id' => 'front' );
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue