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
cdfb405fe4
commit
563488e727
3 changed files with 8 additions and 7 deletions
|
@ -72,7 +72,9 @@ class WcGateway extends \WC_Payment_Gateway
|
|||
);
|
||||
}
|
||||
|
||||
public function needs_setup() {
|
||||
public function needs_setup()
|
||||
{
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,14 +58,14 @@ class WcGatewayModule implements ModuleInterface
|
|||
|
||||
add_action(
|
||||
'wp_ajax_woocommerce_toggle_gateway_enabled',
|
||||
function() use ($container) {
|
||||
static function () use ($container) {
|
||||
if (
|
||||
! current_user_can( 'manage_woocommerce' )
|
||||
! current_user_can('manage_woocommerce')
|
||||
|| ! check_ajax_referer(
|
||||
'woocommerce-toggle-payment-gateway-enabled',
|
||||
'security'
|
||||
)
|
||||
|| ! isset( $_POST['gateway_id'] )
|
||||
|| ! isset($_POST['gateway_id'])
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
@ -85,11 +85,10 @@ class WcGatewayModule implements ModuleInterface
|
|||
);
|
||||
add_action(
|
||||
'woocommerce-paypal-commerce-gateway.deactivate',
|
||||
function() use ($container) {
|
||||
static function () use ($container) {
|
||||
delete_option(Settings::KEY);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
private function registerPaymentGateWay(ContainerInterface $container)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue