From 080c5b50e7bcef69c2c683e1eb0824006e7c377d Mon Sep 17 00:00:00 2001 From: Paul Dechov Date: Tue, 12 Dec 2017 14:04:36 -0500 Subject: [PATCH] Omit PayPal Standard unless plugins cannot be installed --- includes/admin/class-wc-admin-setup-wizard.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/includes/admin/class-wc-admin-setup-wizard.php b/includes/admin/class-wc-admin-setup-wizard.php index 2a5dfa69e7f..92184e5f4e4 100644 --- a/includes/admin/class-wc-admin-setup-wizard.php +++ b/includes/admin/class-wc-admin-setup-wizard.php @@ -1201,7 +1201,6 @@ class WC_Admin_Setup_Wizard { $gateways = array( 'stripe' => $stripe, 'ppec_paypal' => $ppec_paypal, - 'paypal' => $paypal, ); if ( ! $can_stripe ) { @@ -1233,11 +1232,9 @@ class WC_Admin_Setup_Wizard { } if ( ! current_user_can( 'install_plugins' ) ) { - unset( $gateways['ppec_paypal'] ); - unset( $gateways['stripe'] ); - unset( $gateways['klarna_checkout'] ); - unset( $gateways['klarna_payments'] ); - unset( $gateways['square'] ); + $gateways = array( + 'paypal' => $paypal, + ); } return $gateways;