Completed
Pull Request — master (#1337)
by
unknown
01:44
created
includes/admin/class-wc-stripe-inbox-notes.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) {
2
+if ( ! defined('ABSPATH')) {
3 3
 	exit;
4 4
 }
5 5
 
@@ -16,52 +16,52 @@  discard block
 block discarded – undo
16 16
 
17 17
 	// TODO Call this only after domain verification has a chance to run
18 18
 	public static function notify_of_apple_pay_domain_verification_if_needed() {
19
-		if ( ! class_exists( 'Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes' ) ) {
19
+		if ( ! class_exists('Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes')) {
20 20
 			return;
21 21
 		}
22 22
 
23
-		if ( ! class_exists( 'WC_Data_Store' ) ) {
23
+		if ( ! class_exists('WC_Data_Store')) {
24 24
 			return;
25 25
 		}
26 26
 
27
-		$stripe_settings       = get_option( 'woocommerce_stripe_settings', array() );
27
+		$stripe_settings       = get_option('woocommerce_stripe_settings', array());
28 28
 		$domain_flag_key       = 'apple_pay_domain_set';
29
-		$verification_complete = isset( $stripe_settings[ $domain_flag_key ] ) && 'yes' === $stripe_settings[ $domain_flag_key ];
29
+		$verification_complete = isset($stripe_settings[$domain_flag_key]) && 'yes' === $stripe_settings[$domain_flag_key];
30 30
 
31 31
 		// Only show if in the US.
32 32
 		$base_location = wc_get_base_location();
33
-		if ( ! $base_location || 'US' !== $base_location['country'] ) {
33
+		if ( ! $base_location || 'US' !== $base_location['country']) {
34 34
 			return;
35 35
 		}
36 36
 
37
-		$data_store = WC_Data_Store::load( 'admin-note' );
37
+		$data_store = WC_Data_Store::load('admin-note');
38 38
 
39 39
 		// First, see if we've already created this kind of note so we don't do it again.
40
-		$note_ids = $data_store->get_notes_with_name( self::NOTE_NAME );
41
-		if ( ! empty( $note_ids ) ) {
42
-			$note_id = array_pop( $note_ids );
43
-			$note    = WC_Admin_Notes::get_note( $note_id );
44
-			if ( false === $note ) {
40
+		$note_ids = $data_store->get_notes_with_name(self::NOTE_NAME);
41
+		if ( ! empty($note_ids)) {
42
+			$note_id = array_pop($note_ids);
43
+			$note    = WC_Admin_Notes::get_note($note_id);
44
+			if (false === $note) {
45 45
 				return;
46 46
 			}
47 47
 
48 48
 			// If the domain verification completed after the note was created, make sure it's marked as actioned.
49
-			if ( $verification_complete && WC_Admin_Note::E_WC_ADMIN_NOTE_ACTIONED !== $note->get_status() ) {
50
-				$note->set_status( WC_Admin_Note::E_WC_ADMIN_NOTE_ACTIONED );
49
+			if ($verification_complete && WC_Admin_Note::E_WC_ADMIN_NOTE_ACTIONED !== $note->get_status()) {
50
+				$note->set_status(WC_Admin_Note::E_WC_ADMIN_NOTE_ACTIONED);
51 51
 				$note->save();
52 52
 			}
53 53
 			return;
54 54
 		}
55 55
 
56 56
 		$note = new WC_Admin_Note();
57
-		$note->set_title( __( 'Apple Pay domain verification needed', 'woocommerce-admin' ) );
58
-		$note->set_content( __( 'The WooCommerce Stripe Gateway extension attempted to perform domain verification on behalf of your store, but was unable to do so. This will need to be in place before Apple Pay will be functional for your customers.', 'woocommerce-admin' ) );
59
-		$note->set_type( WC_Admin_Note::E_WC_ADMIN_NOTE_INFORMATIONAL );
60
-		$note->set_name( self::NOTE_NAME );
61
-		$note->set_source( 'woocommerce-admin' );
57
+		$note->set_title(__('Apple Pay domain verification needed', 'woocommerce-admin'));
58
+		$note->set_content(__('The WooCommerce Stripe Gateway extension attempted to perform domain verification on behalf of your store, but was unable to do so. This will need to be in place before Apple Pay will be functional for your customers.', 'woocommerce-admin'));
59
+		$note->set_type(WC_Admin_Note::E_WC_ADMIN_NOTE_INFORMATIONAL);
60
+		$note->set_name(self::NOTE_NAME);
61
+		$note->set_source('woocommerce-admin');
62 62
 		$note->add_action(
63 63
 			'learn-more',
64
-			__( 'Learn more', 'woocommerce-admin' ),
64
+			__('Learn more', 'woocommerce-admin'),
65 65
 			'https://docs.woocommerce.com/document/stripe/#apple-pay'
66 66
 		);
67 67
 		$note->save();
Please login to merge, or discard this patch.
woocommerce-gateway-stripe.php 1 patch
Spacing   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -15,20 +15,20 @@  discard block
 block discarded – undo
15 15
  *
16 16
  */
17 17
 
18
-if ( ! defined( 'ABSPATH' ) ) {
18
+if ( ! defined('ABSPATH')) {
19 19
 	exit;
20 20
 }
21 21
 
22 22
 /**
23 23
  * Required minimums and constants
24 24
  */
25
-define( 'WC_STRIPE_VERSION', '4.5.3' ); // WRCS: DEFINED_VERSION.
26
-define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
27
-define( 'WC_STRIPE_MIN_WC_VER', '3.0' );
28
-define( 'WC_STRIPE_FUTURE_MIN_WC_VER', '3.0' );
29
-define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
30
-define( 'WC_STRIPE_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
31
-define( 'WC_STRIPE_PLUGIN_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
25
+define('WC_STRIPE_VERSION', '4.5.3'); // WRCS: DEFINED_VERSION.
26
+define('WC_STRIPE_MIN_PHP_VER', '5.6.0');
27
+define('WC_STRIPE_MIN_WC_VER', '3.0');
28
+define('WC_STRIPE_FUTURE_MIN_WC_VER', '3.0');
29
+define('WC_STRIPE_MAIN_FILE', __FILE__);
30
+define('WC_STRIPE_PLUGIN_URL', untrailingslashit(plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__))));
31
+define('WC_STRIPE_PLUGIN_PATH', untrailingslashit(plugin_dir_path(__FILE__)));
32 32
 
33 33
 // phpcs:disable WordPress.Files.FileName
34 34
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
  */
41 41
 function woocommerce_stripe_missing_wc_notice() {
42 42
 	/* translators: 1. URL link. */
43
-	echo '<div class="error"><p><strong>' . sprintf( esc_html__( 'Stripe requires WooCommerce to be installed and active. You can download %s here.', 'woocommerce-gateway-stripe' ), '<a href="https://woocommerce.com/" target="_blank">WooCommerce</a>' ) . '</strong></p></div>';
43
+	echo '<div class="error"><p><strong>' . sprintf(esc_html__('Stripe requires WooCommerce to be installed and active. You can download %s here.', 'woocommerce-gateway-stripe'), '<a href="https://woocommerce.com/" target="_blank">WooCommerce</a>') . '</strong></p></div>';
44 44
 }
45 45
 
46 46
 /**
@@ -51,25 +51,25 @@  discard block
 block discarded – undo
51 51
  */
52 52
 function woocommerce_stripe_wc_not_supported() {
53 53
 	/* translators: $1. Minimum WooCommerce version. $2. Current WooCommerce version. */
54
-	echo '<div class="error"><p><strong>' . sprintf( esc_html__( 'Stripe requires WooCommerce %1$s or greater to be installed and active. WooCommerce %2$s is no longer supported.', 'woocommerce-gateway-stripe' ), WC_STRIPE_MIN_WC_VER, WC_VERSION ) . '</strong></p></div>';
54
+	echo '<div class="error"><p><strong>' . sprintf(esc_html__('Stripe requires WooCommerce %1$s or greater to be installed and active. WooCommerce %2$s is no longer supported.', 'woocommerce-gateway-stripe'), WC_STRIPE_MIN_WC_VER, WC_VERSION) . '</strong></p></div>';
55 55
 }
56 56
 
57
-add_action( 'plugins_loaded', 'woocommerce_gateway_stripe_init' );
57
+add_action('plugins_loaded', 'woocommerce_gateway_stripe_init');
58 58
 
59 59
 function woocommerce_gateway_stripe_init() {
60
-	load_plugin_textdomain( 'woocommerce-gateway-stripe', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
60
+	load_plugin_textdomain('woocommerce-gateway-stripe', false, plugin_basename(dirname(__FILE__)) . '/languages');
61 61
 
62
-	if ( ! class_exists( 'WooCommerce' ) ) {
63
-		add_action( 'admin_notices', 'woocommerce_stripe_missing_wc_notice' );
62
+	if ( ! class_exists('WooCommerce')) {
63
+		add_action('admin_notices', 'woocommerce_stripe_missing_wc_notice');
64 64
 		return;
65 65
 	}
66 66
 
67
-	if ( version_compare( WC_VERSION, WC_STRIPE_MIN_WC_VER, '<' ) ) {
68
-		add_action( 'admin_notices', 'woocommerce_stripe_wc_not_supported' );
67
+	if (version_compare(WC_VERSION, WC_STRIPE_MIN_WC_VER, '<')) {
68
+		add_action('admin_notices', 'woocommerce_stripe_wc_not_supported');
69 69
 		return;
70 70
 	}
71 71
 
72
-	if ( ! class_exists( 'WC_Stripe' ) ) :
72
+	if ( ! class_exists('WC_Stripe')) :
73 73
 
74 74
 		class WC_Stripe {
75 75
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 			 * @return Singleton The *Singleton* instance.
85 85
 			 */
86 86
 			public static function get_instance() {
87
-				if ( null === self::$instance ) {
87
+				if (null === self::$instance) {
88 88
 					self::$instance = new self();
89 89
 				}
90 90
 				return self::$instance;
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 			 * *Singleton* via the `new` operator from outside of this class.
112 112
 			 */
113 113
 			private function __construct() {
114
-				add_action( 'admin_init', array( $this, 'install' ) );
114
+				add_action('admin_init', array($this, 'install'));
115 115
 				$this->init();
116 116
 			}
117 117
 
@@ -122,54 +122,54 @@  discard block
 block discarded – undo
122 122
 			 * @version 4.0.0
123 123
 			 */
124 124
 			public function init() {
125
-				if ( is_admin() ) {
126
-					require_once dirname( __FILE__ ) . '/includes/admin/class-wc-stripe-privacy.php';
127
-					require_once dirname( __FILE__ ) . '/includes/admin/class-wc-stripe-inbox-notes.php';
125
+				if (is_admin()) {
126
+					require_once dirname(__FILE__) . '/includes/admin/class-wc-stripe-privacy.php';
127
+					require_once dirname(__FILE__) . '/includes/admin/class-wc-stripe-inbox-notes.php';
128 128
 				}
129 129
 
130
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-exception.php';
131
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-logger.php';
132
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-helper.php';
133
-				include_once dirname( __FILE__ ) . '/includes/class-wc-stripe-api.php';
134
-				require_once dirname( __FILE__ ) . '/includes/abstracts/abstract-wc-stripe-payment-gateway.php';
135
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-webhook-handler.php';
136
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-sepa-payment-token.php';
137
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-apple-pay-registration.php';
138
-				require_once dirname( __FILE__ ) . '/includes/compat/class-wc-stripe-pre-orders-compat.php';
139
-				require_once dirname( __FILE__ ) . '/includes/class-wc-gateway-stripe.php';
140
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-bancontact.php';
141
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-sofort.php';
142
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-giropay.php';
143
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-eps.php';
144
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-ideal.php';
145
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-p24.php';
146
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-alipay.php';
147
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-sepa.php';
148
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-multibanco.php';
149
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-stripe-payment-request.php';
150
-				require_once dirname( __FILE__ ) . '/includes/compat/class-wc-stripe-subs-compat.php';
151
-				require_once dirname( __FILE__ ) . '/includes/compat/class-wc-stripe-sepa-subs-compat.php';
152
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-order-handler.php';
153
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-payment-tokens.php';
154
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-customer.php';
155
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-intent-controller.php';
156
-
157
-				if ( is_admin() ) {
158
-					require_once dirname( __FILE__ ) . '/includes/admin/class-wc-stripe-admin-notices.php';
130
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-exception.php';
131
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-logger.php';
132
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-helper.php';
133
+				include_once dirname(__FILE__) . '/includes/class-wc-stripe-api.php';
134
+				require_once dirname(__FILE__) . '/includes/abstracts/abstract-wc-stripe-payment-gateway.php';
135
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-webhook-handler.php';
136
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-sepa-payment-token.php';
137
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-apple-pay-registration.php';
138
+				require_once dirname(__FILE__) . '/includes/compat/class-wc-stripe-pre-orders-compat.php';
139
+				require_once dirname(__FILE__) . '/includes/class-wc-gateway-stripe.php';
140
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-bancontact.php';
141
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-sofort.php';
142
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-giropay.php';
143
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-eps.php';
144
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-ideal.php';
145
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-p24.php';
146
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-alipay.php';
147
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-sepa.php';
148
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-multibanco.php';
149
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-stripe-payment-request.php';
150
+				require_once dirname(__FILE__) . '/includes/compat/class-wc-stripe-subs-compat.php';
151
+				require_once dirname(__FILE__) . '/includes/compat/class-wc-stripe-sepa-subs-compat.php';
152
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-order-handler.php';
153
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-payment-tokens.php';
154
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-customer.php';
155
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-intent-controller.php';
156
+
157
+				if (is_admin()) {
158
+					require_once dirname(__FILE__) . '/includes/admin/class-wc-stripe-admin-notices.php';
159 159
 				}
160 160
 
161 161
 				// REMOVE IN THE FUTURE.
162
-				require_once dirname( __FILE__ ) . '/includes/deprecated/class-wc-stripe-apple-pay.php';
162
+				require_once dirname(__FILE__) . '/includes/deprecated/class-wc-stripe-apple-pay.php';
163 163
 
164
-				add_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateways' ) );
165
-				add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) );
166
-				add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
164
+				add_filter('woocommerce_payment_gateways', array($this, 'add_gateways'));
165
+				add_filter('plugin_action_links_' . plugin_basename(__FILE__), array($this, 'plugin_action_links'));
166
+				add_filter('plugin_row_meta', array($this, 'plugin_row_meta'), 10, 2);
167 167
 
168 168
 				// Modify emails emails.
169
-				add_filter( 'woocommerce_email_classes', array( $this, 'add_emails' ), 20 );
169
+				add_filter('woocommerce_email_classes', array($this, 'add_emails'), 20);
170 170
 
171
-				if ( version_compare( WC_VERSION, '3.4', '<' ) ) {
172
-					add_filter( 'woocommerce_get_sections_checkout', array( $this, 'filter_gateway_order_admin' ) );
171
+				if (version_compare(WC_VERSION, '3.4', '<')) {
172
+					add_filter('woocommerce_get_sections_checkout', array($this, 'filter_gateway_order_admin'));
173 173
 				}
174 174
 			}
175 175
 
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
 			 * @version 4.0.0
181 181
 			 */
182 182
 			public function update_plugin_version() {
183
-				delete_option( 'wc_stripe_version' );
184
-				update_option( 'wc_stripe_version', WC_STRIPE_VERSION );
183
+				delete_option('wc_stripe_version');
184
+				update_option('wc_stripe_version', WC_STRIPE_VERSION);
185 185
 			}
186 186
 
187 187
 			/**
@@ -191,15 +191,15 @@  discard block
 block discarded – undo
191 191
 			 * @version 3.1.0
192 192
 			 */
193 193
 			public function install() {
194
-				if ( ! is_plugin_active( plugin_basename( __FILE__ ) ) ) {
194
+				if ( ! is_plugin_active(plugin_basename(__FILE__))) {
195 195
 					return;
196 196
 				}
197 197
 
198
-				if ( ! defined( 'IFRAME_REQUEST' ) && ( WC_STRIPE_VERSION !== get_option( 'wc_stripe_version' ) ) ) {
199
-					do_action( 'woocommerce_stripe_updated' );
198
+				if ( ! defined('IFRAME_REQUEST') && (WC_STRIPE_VERSION !== get_option('wc_stripe_version'))) {
199
+					do_action('woocommerce_stripe_updated');
200 200
 
201
-					if ( ! defined( 'WC_STRIPE_INSTALLING' ) ) {
202
-						define( 'WC_STRIPE_INSTALLING', true );
201
+					if ( ! defined('WC_STRIPE_INSTALLING')) {
202
+						define('WC_STRIPE_INSTALLING', true);
203 203
 					}
204 204
 
205 205
 					$this->update_plugin_version();
@@ -212,11 +212,11 @@  discard block
 block discarded – undo
212 212
 			 * @since 1.0.0
213 213
 			 * @version 4.0.0
214 214
 			 */
215
-			public function plugin_action_links( $links ) {
215
+			public function plugin_action_links($links) {
216 216
 				$plugin_links = array(
217
-					'<a href="admin.php?page=wc-settings&tab=checkout&section=stripe">' . esc_html__( 'Settings', 'woocommerce-gateway-stripe' ) . '</a>',
217
+					'<a href="admin.php?page=wc-settings&tab=checkout&section=stripe">' . esc_html__('Settings', 'woocommerce-gateway-stripe') . '</a>',
218 218
 				);
219
-				return array_merge( $plugin_links, $links );
219
+				return array_merge($plugin_links, $links);
220 220
 			}
221 221
 
222 222
 			/**
@@ -227,13 +227,13 @@  discard block
 block discarded – undo
227 227
 			 * @param  string $file  Name of current file.
228 228
 			 * @return array  $links Update list of plugin links.
229 229
 			 */
230
-			public function plugin_row_meta( $links, $file ) {
231
-				if ( plugin_basename( __FILE__ ) === $file ) {
230
+			public function plugin_row_meta($links, $file) {
231
+				if (plugin_basename(__FILE__) === $file) {
232 232
 					$row_meta = array(
233
-						'docs'    => '<a href="' . esc_url( apply_filters( 'woocommerce_gateway_stripe_docs_url', 'https://docs.woocommerce.com/document/stripe/' ) ) . '" title="' . esc_attr( __( 'View Documentation', 'woocommerce-gateway-stripe' ) ) . '">' . __( 'Docs', 'woocommerce-gateway-stripe' ) . '</a>',
234
-						'support' => '<a href="' . esc_url( apply_filters( 'woocommerce_gateway_stripe_support_url', 'https://woocommerce.com/my-account/create-a-ticket?select=18627' ) ) . '" title="' . esc_attr( __( 'Open a support request at WooCommerce.com', 'woocommerce-gateway-stripe' ) ) . '">' . __( 'Support', 'woocommerce-gateway-stripe' ) . '</a>',
233
+						'docs'    => '<a href="' . esc_url(apply_filters('woocommerce_gateway_stripe_docs_url', 'https://docs.woocommerce.com/document/stripe/')) . '" title="' . esc_attr(__('View Documentation', 'woocommerce-gateway-stripe')) . '">' . __('Docs', 'woocommerce-gateway-stripe') . '</a>',
234
+						'support' => '<a href="' . esc_url(apply_filters('woocommerce_gateway_stripe_support_url', 'https://woocommerce.com/my-account/create-a-ticket?select=18627')) . '" title="' . esc_attr(__('Open a support request at WooCommerce.com', 'woocommerce-gateway-stripe')) . '">' . __('Support', 'woocommerce-gateway-stripe') . '</a>',
235 235
 					);
236
-					return array_merge( $links, $row_meta );
236
+					return array_merge($links, $row_meta);
237 237
 				}
238 238
 				return (array) $links;
239 239
 			}
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
 			 * @since 1.0.0
245 245
 			 * @version 4.0.0
246 246
 			 */
247
-			public function add_gateways( $methods ) {
248
-				if ( class_exists( 'WC_Subscriptions_Order' ) && function_exists( 'wcs_create_renewal_order' ) ) {
247
+			public function add_gateways($methods) {
248
+				if (class_exists('WC_Subscriptions_Order') && function_exists('wcs_create_renewal_order')) {
249 249
 					$methods[] = 'WC_Stripe_Subs_Compat';
250 250
 					$methods[] = 'WC_Stripe_Sepa_Subs_Compat';
251 251
 				} else {
@@ -271,28 +271,28 @@  discard block
 block discarded – undo
271 271
 			 * @since 4.0.0
272 272
 			 * @version 4.0.0
273 273
 			 */
274
-			public function filter_gateway_order_admin( $sections ) {
275
-				unset( $sections['stripe'] );
276
-				unset( $sections['stripe_bancontact'] );
277
-				unset( $sections['stripe_sofort'] );
278
-				unset( $sections['stripe_giropay'] );
279
-				unset( $sections['stripe_eps'] );
280
-				unset( $sections['stripe_ideal'] );
281
-				unset( $sections['stripe_p24'] );
282
-				unset( $sections['stripe_alipay'] );
283
-				unset( $sections['stripe_sepa'] );
284
-				unset( $sections['stripe_multibanco'] );
274
+			public function filter_gateway_order_admin($sections) {
275
+				unset($sections['stripe']);
276
+				unset($sections['stripe_bancontact']);
277
+				unset($sections['stripe_sofort']);
278
+				unset($sections['stripe_giropay']);
279
+				unset($sections['stripe_eps']);
280
+				unset($sections['stripe_ideal']);
281
+				unset($sections['stripe_p24']);
282
+				unset($sections['stripe_alipay']);
283
+				unset($sections['stripe_sepa']);
284
+				unset($sections['stripe_multibanco']);
285 285
 
286 286
 				$sections['stripe']            = 'Stripe';
287
-				$sections['stripe_bancontact'] = __( 'Stripe Bancontact', 'woocommerce-gateway-stripe' );
288
-				$sections['stripe_sofort']     = __( 'Stripe SOFORT', 'woocommerce-gateway-stripe' );
289
-				$sections['stripe_giropay']    = __( 'Stripe Giropay', 'woocommerce-gateway-stripe' );
290
-				$sections['stripe_eps']        = __( 'Stripe EPS', 'woocommerce-gateway-stripe' );
291
-				$sections['stripe_ideal']      = __( 'Stripe iDeal', 'woocommerce-gateway-stripe' );
292
-				$sections['stripe_p24']        = __( 'Stripe P24', 'woocommerce-gateway-stripe' );
293
-				$sections['stripe_alipay']     = __( 'Stripe Alipay', 'woocommerce-gateway-stripe' );
294
-				$sections['stripe_sepa']       = __( 'Stripe SEPA Direct Debit', 'woocommerce-gateway-stripe' );
295
-				$sections['stripe_multibanco'] = __( 'Stripe Multibanco', 'woocommerce-gateway-stripe' );
287
+				$sections['stripe_bancontact'] = __('Stripe Bancontact', 'woocommerce-gateway-stripe');
288
+				$sections['stripe_sofort']     = __('Stripe SOFORT', 'woocommerce-gateway-stripe');
289
+				$sections['stripe_giropay']    = __('Stripe Giropay', 'woocommerce-gateway-stripe');
290
+				$sections['stripe_eps']        = __('Stripe EPS', 'woocommerce-gateway-stripe');
291
+				$sections['stripe_ideal']      = __('Stripe iDeal', 'woocommerce-gateway-stripe');
292
+				$sections['stripe_p24']        = __('Stripe P24', 'woocommerce-gateway-stripe');
293
+				$sections['stripe_alipay']     = __('Stripe Alipay', 'woocommerce-gateway-stripe');
294
+				$sections['stripe_sepa']       = __('Stripe SEPA Direct Debit', 'woocommerce-gateway-stripe');
295
+				$sections['stripe_multibanco'] = __('Stripe Multibanco', 'woocommerce-gateway-stripe');
296 296
 
297 297
 				return $sections;
298 298
 			}
@@ -303,16 +303,16 @@  discard block
 block discarded – undo
303 303
 			 * @param WC_Email[] $email_classes All existing emails.
304 304
 			 * @return WC_Email[]
305 305
 			 */
306
-			public function add_emails( $email_classes ) {
306
+			public function add_emails($email_classes) {
307 307
 				require_once WC_STRIPE_PLUGIN_PATH . '/includes/compat/class-wc-stripe-email-failed-authentication.php';
308 308
 				require_once WC_STRIPE_PLUGIN_PATH . '/includes/compat/class-wc-stripe-email-failed-renewal-authentication.php';
309 309
 				require_once WC_STRIPE_PLUGIN_PATH . '/includes/compat/class-wc-stripe-email-failed-preorder-authentication.php';
310 310
 				require_once WC_STRIPE_PLUGIN_PATH . '/includes/compat/class-wc-stripe-email-failed-authentication-retry.php';
311 311
 
312 312
 				// Add all emails, generated by the gateway.
313
-				$email_classes['WC_Stripe_Email_Failed_Renewal_Authentication']  = new WC_Stripe_Email_Failed_Renewal_Authentication( $email_classes );
314
-				$email_classes['WC_Stripe_Email_Failed_Preorder_Authentication'] = new WC_Stripe_Email_Failed_Preorder_Authentication( $email_classes );
315
-				$email_classes['WC_Stripe_Email_Failed_Authentication_Retry'] = new WC_Stripe_Email_Failed_Authentication_Retry( $email_classes );
313
+				$email_classes['WC_Stripe_Email_Failed_Renewal_Authentication']  = new WC_Stripe_Email_Failed_Renewal_Authentication($email_classes);
314
+				$email_classes['WC_Stripe_Email_Failed_Preorder_Authentication'] = new WC_Stripe_Email_Failed_Preorder_Authentication($email_classes);
315
+				$email_classes['WC_Stripe_Email_Failed_Authentication_Retry'] = new WC_Stripe_Email_Failed_Authentication_Retry($email_classes);
316 316
 
317 317
 				return $email_classes;
318 318
 			}
Please login to merge, or discard this patch.