Skip to content

Commit ec537cd

Browse files
committed
Apple Pay: add class_exists wrappers
1 parent 054d8fd commit ec537cd

9 files changed

+36
-0
lines changed

woocommerce/payment-gateway/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-request.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
defined( 'ABSPATH' ) or exit;
2626

27+
if ( ! class_exists( 'SV_WC_Payment_Gateway_Apple_Pay_API_Request' ) ) :
28+
2729
/**
2830
* The Apple Pay API request object.
2931
*
@@ -103,3 +105,5 @@ public function to_string_safe() {
103105

104106

105107
}
108+
109+
endif;

woocommerce/payment-gateway/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-response.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
defined( 'ABSPATH' ) or exit;
2626

27+
if ( ! class_exists( 'SV_WC_Payment_Gateway_Apple_Pay_API_Response' ) ) :
28+
2729
/**
2830
* The Apple Pay API response object.
2931
*
@@ -102,3 +104,5 @@ public function to_string_safe() {
102104

103105

104106
}
107+
108+
endif;

woocommerce/payment-gateway/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
defined( 'ABSPATH' ) or exit;
2626

27+
if ( ! class_exists( 'SV_WC_Payment_Gateway_Apple_Pay_API' ) ) :
28+
2729
/**
2830
* Sets up the Apple Pay API.
2931
*
@@ -187,3 +189,5 @@ protected function get_plugin() {
187189

188190

189191
}
192+
193+
endif;

woocommerce/payment-gateway/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-payment-response.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
defined( 'ABSPATH' ) or exit;
2626

27+
if ( ! class_exists( 'SV_WC_Payment_Gateway_Apple_Pay_Payment_Response' ) ) :
28+
2729
/**
2830
* The Apple Pay payment response object.
2931
*
@@ -197,3 +199,5 @@ public function to_string_safe() {
197199

198200

199201
}
202+
203+
endif;

woocommerce/payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
defined( 'ABSPATH' ) or exit;
2626

27+
if ( ! class_exists( 'SV_WC_Payment_Gateway_Apple_Pay_Admin' ) ) :
28+
2729
/**
2830
* Sets up the Apple Pay settings screen.
2931
*
@@ -401,3 +403,5 @@ protected function get_gateway_options() {
401403

402404

403405
}
406+
407+
endif;

woocommerce/payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-ajax.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
defined( 'ABSPATH' ) or exit;
2626

27+
if ( ! class_exists( 'SV_WC_Payment_Gateway_Apple_Pay_AJAX' ) ) :
28+
2729
/**
2830
* The Apple Pay AJAX handler.
2931
*
@@ -253,3 +255,5 @@ protected function get_handler() {
253255

254256

255257
}
258+
259+
endif;

woocommerce/payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
defined( 'ABSPATH' ) or exit;
2626

27+
if ( ! class_exists( 'SV_WC_Payment_Gateway_Apple_Pay_Frontend' ) ) :
28+
2729
/**
2830
* Sets up the Apple Pay front-end functionality.
2931
*
@@ -349,3 +351,5 @@ protected function get_handler() {
349351

350352

351353
}
354+
355+
endif;

woocommerce/payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay-orders.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
defined( 'ABSPATH' ) or exit;
2626

27+
if ( ! class_exists( 'SV_WC_Payment_Gateway_Apple_Pay_Orders' ) ) :
28+
2729
/**
2830
* The Apple Pay order handler.
2931
*
@@ -183,3 +185,5 @@ public static function get_order_object( $order_data ) {
183185

184186

185187
}
188+
189+
endif;

woocommerce/payment-gateway/apple-pay/class-sv-wc-payment-gateway-apple-pay.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
defined( 'ABSPATH' ) or exit;
2626

27+
if ( ! class_exists( 'SV_WC_Payment_Gateway_Apple_Pay' ) ) :
28+
2729
/**
2830
* Sets up Apple Pay support.
2931
*
@@ -1035,3 +1037,5 @@ public function get_plugin() {
10351037

10361038

10371039
}
1040+
1041+
endif;

0 commit comments

Comments
 (0)