diff --git a/store-on-wpcom/class-wc-calypso-bridge.php b/store-on-wpcom/class-wc-calypso-bridge.php index a20b7b28..66de82d5 100644 --- a/store-on-wpcom/class-wc-calypso-bridge.php +++ b/store-on-wpcom/class-wc-calypso-bridge.php @@ -78,7 +78,6 @@ public function includes() { include_once dirname( __FILE__ ) . '/inc/wc-calypso-bridge-mailchimp-no-redirect.php'; include_once dirname( __FILE__ ) . '/inc/wc-calypso-bridge-masterbar-menu.php'; include_once dirname( __FILE__ ) . '/inc/wc-calypso-bridge-paypal-defaults.php'; - include_once dirname( __FILE__ ) . '/inc/wc-calypso-bridge-paypal-method-supports.php'; include_once dirname( __FILE__ ) . '/inc/wc-calypso-bridge-products.php'; } diff --git a/store-on-wpcom/inc/wc-calypso-bridge-paypal-method-supports.php b/store-on-wpcom/inc/wc-calypso-bridge-paypal-method-supports.php deleted file mode 100644 index 667ddb82..00000000 --- a/store-on-wpcom/inc/wc-calypso-bridge-paypal-method-supports.php +++ /dev/null @@ -1,32 +0,0 @@ -id ) { - $api_username = $gateway->get_option( 'api_username' ); - $api_password = $gateway->get_option( 'api_password' ); - $api_signature = $gateway->get_option( 'api_signature' ); - - // If api username, password or signature is not set, i.e. empty string, we can't support woo-based refunds - if ( empty( $api_username ) || empty( $api_password ) || empty( $api_signature ) ) { - $supported_methods = array_diff( $gateway->supports, [ 'refunds' ] ); - $response->data[ 'method_supports' ] = $supported_methods; - } - } - return $response; -} - -add_filter( 'woocommerce_rest_prepare_payment_gateway', 'wc_calypso_bridge_adjust_paypal_method_supports', 10, 3 );