codestyle

This commit is contained in:
David Remer 2020-09-11 14:24:08 +03:00
parent c788341887
commit 9e2f1f4bf9
11 changed files with 27 additions and 26 deletions

View file

@ -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' ),

View file

@ -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() ) {

View file

@ -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' );
}
/**