Completed
Pull Request — master (#1279)
by
unknown
01:47
created
woocommerce-gateway-stripe.php 1 patch
Spacing   +103 added lines, -103 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.1' );
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.1');
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,7 +51,7 @@  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 57
 /**
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
  * @return string
62 62
  */
63 63
 function woocommerce_stripe_wc_country_not_supported() {
64
-	echo '<div class="error"><p><strong>' . __( 'Stripe is not available in your store\'s country and will not be available for buyers to choose during checkout.', 'woocommerce-gateway-stripe' ) . '</strong></p></div>';
64
+	echo '<div class="error"><p><strong>' . __('Stripe is not available in your store\'s country and will not be available for buyers to choose during checkout.', 'woocommerce-gateway-stripe') . '</strong></p></div>';
65 65
 }
66 66
 
67 67
 /**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
  * @return bool
73 73
  */
74 74
 function woocommerce_stripe_wc_country_is_supported_country() {
75
-	$wc_default_country = substr( get_option( 'woocommerce_default_country' ), 0, 2 );
75
+	$wc_default_country = substr(get_option('woocommerce_default_country'), 0, 2);
76 76
 
77 77
 	$supported_countries = apply_filters(
78 78
 		'wc_stripe_supported_countries',
@@ -118,30 +118,30 @@  discard block
 block discarded – undo
118 118
 		)
119 119
 	);
120 120
 
121
-	return in_array( $wc_default_country, $supported_countries );
121
+	return in_array($wc_default_country, $supported_countries);
122 122
 }
123 123
 
124
-add_action( 'plugins_loaded', 'woocommerce_gateway_stripe_init' );
124
+add_action('plugins_loaded', 'woocommerce_gateway_stripe_init');
125 125
 
126 126
 function woocommerce_gateway_stripe_init() {
127
-	load_plugin_textdomain( 'woocommerce-gateway-stripe', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
127
+	load_plugin_textdomain('woocommerce-gateway-stripe', false, plugin_basename(dirname(__FILE__)) . '/languages');
128 128
 
129
-	if ( ! class_exists( 'WooCommerce' ) ) {
130
-		add_action( 'admin_notices', 'woocommerce_stripe_missing_wc_notice' );
129
+	if ( ! class_exists('WooCommerce')) {
130
+		add_action('admin_notices', 'woocommerce_stripe_missing_wc_notice');
131 131
 		return;
132 132
 	}
133 133
 
134
-	if ( version_compare( WC_VERSION, WC_STRIPE_MIN_WC_VER, '<' ) ) {
135
-		add_action( 'admin_notices', 'woocommerce_stripe_wc_not_supported' );
134
+	if (version_compare(WC_VERSION, WC_STRIPE_MIN_WC_VER, '<')) {
135
+		add_action('admin_notices', 'woocommerce_stripe_wc_not_supported');
136 136
 		return;
137 137
 	}
138 138
 
139
-	if ( ! woocommerce_stripe_wc_country_is_supported_country() ) {
140
-		add_action( 'admin_notices', 'woocommerce_stripe_wc_country_not_supported' );
139
+	if ( ! woocommerce_stripe_wc_country_is_supported_country()) {
140
+		add_action('admin_notices', 'woocommerce_stripe_wc_country_not_supported');
141 141
 		return;
142 142
 	}
143 143
 
144
-	if ( ! class_exists( 'WC_Stripe' ) ) :
144
+	if ( ! class_exists('WC_Stripe')) :
145 145
 
146 146
 		class WC_Stripe {
147 147
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 			 * @return Singleton The *Singleton* instance.
157 157
 			 */
158 158
 			public static function get_instance() {
159
-				if ( null === self::$instance ) {
159
+				if (null === self::$instance) {
160 160
 					self::$instance = new self();
161 161
 				}
162 162
 				return self::$instance;
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 			 * *Singleton* via the `new` operator from outside of this class.
184 184
 			 */
185 185
 			private function __construct() {
186
-				add_action( 'admin_init', array( $this, 'install' ) );
186
+				add_action('admin_init', array($this, 'install'));
187 187
 				$this->init();
188 188
 			}
189 189
 
@@ -194,53 +194,53 @@  discard block
 block discarded – undo
194 194
 			 * @version 4.0.0
195 195
 			 */
196 196
 			public function init() {
197
-				if ( is_admin() ) {
198
-					require_once dirname( __FILE__ ) . '/includes/admin/class-wc-stripe-privacy.php';
197
+				if (is_admin()) {
198
+					require_once dirname(__FILE__) . '/includes/admin/class-wc-stripe-privacy.php';
199 199
 				}
200 200
 
201
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-exception.php';
202
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-logger.php';
203
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-helper.php';
204
-				include_once dirname( __FILE__ ) . '/includes/class-wc-stripe-api.php';
205
-				require_once dirname( __FILE__ ) . '/includes/abstracts/abstract-wc-stripe-payment-gateway.php';
206
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-webhook-handler.php';
207
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-sepa-payment-token.php';
208
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-apple-pay-registration.php';
209
-				require_once dirname( __FILE__ ) . '/includes/compat/class-wc-stripe-pre-orders-compat.php';
210
-				require_once dirname( __FILE__ ) . '/includes/class-wc-gateway-stripe.php';
211
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-bancontact.php';
212
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-sofort.php';
213
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-giropay.php';
214
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-eps.php';
215
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-ideal.php';
216
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-p24.php';
217
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-alipay.php';
218
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-sepa.php';
219
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-gateway-stripe-multibanco.php';
220
-				require_once dirname( __FILE__ ) . '/includes/payment-methods/class-wc-stripe-payment-request.php';
221
-				require_once dirname( __FILE__ ) . '/includes/compat/class-wc-stripe-subs-compat.php';
222
-				require_once dirname( __FILE__ ) . '/includes/compat/class-wc-stripe-sepa-subs-compat.php';
223
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-order-handler.php';
224
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-payment-tokens.php';
225
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-customer.php';
226
-				require_once dirname( __FILE__ ) . '/includes/class-wc-stripe-intent-controller.php';
227
-
228
-				if ( is_admin() ) {
229
-					require_once dirname( __FILE__ ) . '/includes/admin/class-wc-stripe-admin-notices.php';
201
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-exception.php';
202
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-logger.php';
203
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-helper.php';
204
+				include_once dirname(__FILE__) . '/includes/class-wc-stripe-api.php';
205
+				require_once dirname(__FILE__) . '/includes/abstracts/abstract-wc-stripe-payment-gateway.php';
206
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-webhook-handler.php';
207
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-sepa-payment-token.php';
208
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-apple-pay-registration.php';
209
+				require_once dirname(__FILE__) . '/includes/compat/class-wc-stripe-pre-orders-compat.php';
210
+				require_once dirname(__FILE__) . '/includes/class-wc-gateway-stripe.php';
211
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-bancontact.php';
212
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-sofort.php';
213
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-giropay.php';
214
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-eps.php';
215
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-ideal.php';
216
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-p24.php';
217
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-alipay.php';
218
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-sepa.php';
219
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-gateway-stripe-multibanco.php';
220
+				require_once dirname(__FILE__) . '/includes/payment-methods/class-wc-stripe-payment-request.php';
221
+				require_once dirname(__FILE__) . '/includes/compat/class-wc-stripe-subs-compat.php';
222
+				require_once dirname(__FILE__) . '/includes/compat/class-wc-stripe-sepa-subs-compat.php';
223
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-order-handler.php';
224
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-payment-tokens.php';
225
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-customer.php';
226
+				require_once dirname(__FILE__) . '/includes/class-wc-stripe-intent-controller.php';
227
+
228
+				if (is_admin()) {
229
+					require_once dirname(__FILE__) . '/includes/admin/class-wc-stripe-admin-notices.php';
230 230
 				}
231 231
 
232 232
 				// REMOVE IN THE FUTURE.
233
-				require_once dirname( __FILE__ ) . '/includes/deprecated/class-wc-stripe-apple-pay.php';
233
+				require_once dirname(__FILE__) . '/includes/deprecated/class-wc-stripe-apple-pay.php';
234 234
 
235
-				add_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateways' ) );
236
-				add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) );
237
-				add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
235
+				add_filter('woocommerce_payment_gateways', array($this, 'add_gateways'));
236
+				add_filter('plugin_action_links_' . plugin_basename(__FILE__), array($this, 'plugin_action_links'));
237
+				add_filter('plugin_row_meta', array($this, 'plugin_row_meta'), 10, 2);
238 238
 
239 239
 				// Modify emails emails.
240
-				add_filter( 'woocommerce_email_classes', array( $this, 'add_emails' ), 20 );
240
+				add_filter('woocommerce_email_classes', array($this, 'add_emails'), 20);
241 241
 
242
-				if ( version_compare( WC_VERSION, '3.4', '<' ) ) {
243
-					add_filter( 'woocommerce_get_sections_checkout', array( $this, 'filter_gateway_order_admin' ) );
242
+				if (version_compare(WC_VERSION, '3.4', '<')) {
243
+					add_filter('woocommerce_get_sections_checkout', array($this, 'filter_gateway_order_admin'));
244 244
 				}
245 245
 			}
246 246
 
@@ -251,8 +251,8 @@  discard block
 block discarded – undo
251 251
 			 * @version 4.0.0
252 252
 			 */
253 253
 			public function update_plugin_version() {
254
-				delete_option( 'wc_stripe_version' );
255
-				update_option( 'wc_stripe_version', WC_STRIPE_VERSION );
254
+				delete_option('wc_stripe_version');
255
+				update_option('wc_stripe_version', WC_STRIPE_VERSION);
256 256
 			}
257 257
 
258 258
 			/**
@@ -262,15 +262,15 @@  discard block
 block discarded – undo
262 262
 			 * @version 3.1.0
263 263
 			 */
264 264
 			public function install() {
265
-				if ( ! is_plugin_active( plugin_basename( __FILE__ ) ) ) {
265
+				if ( ! is_plugin_active(plugin_basename(__FILE__))) {
266 266
 					return;
267 267
 				}
268 268
 
269
-				if ( ! defined( 'IFRAME_REQUEST' ) && ( WC_STRIPE_VERSION !== get_option( 'wc_stripe_version' ) ) ) {
270
-					do_action( 'woocommerce_stripe_updated' );
269
+				if ( ! defined('IFRAME_REQUEST') && (WC_STRIPE_VERSION !== get_option('wc_stripe_version'))) {
270
+					do_action('woocommerce_stripe_updated');
271 271
 
272
-					if ( ! defined( 'WC_STRIPE_INSTALLING' ) ) {
273
-						define( 'WC_STRIPE_INSTALLING', true );
272
+					if ( ! defined('WC_STRIPE_INSTALLING')) {
273
+						define('WC_STRIPE_INSTALLING', true);
274 274
 					}
275 275
 
276 276
 					$this->update_plugin_version();
@@ -283,11 +283,11 @@  discard block
 block discarded – undo
283 283
 			 * @since 1.0.0
284 284
 			 * @version 4.0.0
285 285
 			 */
286
-			public function plugin_action_links( $links ) {
286
+			public function plugin_action_links($links) {
287 287
 				$plugin_links = array(
288
-					'<a href="admin.php?page=wc-settings&tab=checkout&section=stripe">' . esc_html__( 'Settings', 'woocommerce-gateway-stripe' ) . '</a>',
288
+					'<a href="admin.php?page=wc-settings&tab=checkout&section=stripe">' . esc_html__('Settings', 'woocommerce-gateway-stripe') . '</a>',
289 289
 				);
290
-				return array_merge( $plugin_links, $links );
290
+				return array_merge($plugin_links, $links);
291 291
 			}
292 292
 
293 293
 			/**
@@ -298,13 +298,13 @@  discard block
 block discarded – undo
298 298
 			 * @param  string $file  Name of current file.
299 299
 			 * @return array  $links Update list of plugin links.
300 300
 			 */
301
-			public function plugin_row_meta( $links, $file ) {
302
-				if ( plugin_basename( __FILE__ ) === $file ) {
301
+			public function plugin_row_meta($links, $file) {
302
+				if (plugin_basename(__FILE__) === $file) {
303 303
 					$row_meta = array(
304
-						'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>',
305
-						'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>',
304
+						'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>',
305
+						'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>',
306 306
 					);
307
-					return array_merge( $links, $row_meta );
307
+					return array_merge($links, $row_meta);
308 308
 				}
309 309
 				return (array) $links;
310 310
 			}
@@ -315,8 +315,8 @@  discard block
 block discarded – undo
315 315
 			 * @since 1.0.0
316 316
 			 * @version 4.0.0
317 317
 			 */
318
-			public function add_gateways( $methods ) {
319
-				if ( class_exists( 'WC_Subscriptions_Order' ) && function_exists( 'wcs_create_renewal_order' ) ) {
318
+			public function add_gateways($methods) {
319
+				if (class_exists('WC_Subscriptions_Order') && function_exists('wcs_create_renewal_order')) {
320 320
 					$methods[] = 'WC_Stripe_Subs_Compat';
321 321
 					$methods[] = 'WC_Stripe_Sepa_Subs_Compat';
322 322
 				} else {
@@ -342,28 +342,28 @@  discard block
 block discarded – undo
342 342
 			 * @since 4.0.0
343 343
 			 * @version 4.0.0
344 344
 			 */
345
-			public function filter_gateway_order_admin( $sections ) {
346
-				unset( $sections['stripe'] );
347
-				unset( $sections['stripe_bancontact'] );
348
-				unset( $sections['stripe_sofort'] );
349
-				unset( $sections['stripe_giropay'] );
350
-				unset( $sections['stripe_eps'] );
351
-				unset( $sections['stripe_ideal'] );
352
-				unset( $sections['stripe_p24'] );
353
-				unset( $sections['stripe_alipay'] );
354
-				unset( $sections['stripe_sepa'] );
355
-				unset( $sections['stripe_multibanco'] );
345
+			public function filter_gateway_order_admin($sections) {
346
+				unset($sections['stripe']);
347
+				unset($sections['stripe_bancontact']);
348
+				unset($sections['stripe_sofort']);
349
+				unset($sections['stripe_giropay']);
350
+				unset($sections['stripe_eps']);
351
+				unset($sections['stripe_ideal']);
352
+				unset($sections['stripe_p24']);
353
+				unset($sections['stripe_alipay']);
354
+				unset($sections['stripe_sepa']);
355
+				unset($sections['stripe_multibanco']);
356 356
 
357 357
 				$sections['stripe']            = 'Stripe';
358
-				$sections['stripe_bancontact'] = __( 'Stripe Bancontact', 'woocommerce-gateway-stripe' );
359
-				$sections['stripe_sofort']     = __( 'Stripe SOFORT', 'woocommerce-gateway-stripe' );
360
-				$sections['stripe_giropay']    = __( 'Stripe Giropay', 'woocommerce-gateway-stripe' );
361
-				$sections['stripe_eps']        = __( 'Stripe EPS', 'woocommerce-gateway-stripe' );
362
-				$sections['stripe_ideal']      = __( 'Stripe iDeal', 'woocommerce-gateway-stripe' );
363
-				$sections['stripe_p24']        = __( 'Stripe P24', 'woocommerce-gateway-stripe' );
364
-				$sections['stripe_alipay']     = __( 'Stripe Alipay', 'woocommerce-gateway-stripe' );
365
-				$sections['stripe_sepa']       = __( 'Stripe SEPA Direct Debit', 'woocommerce-gateway-stripe' );
366
-				$sections['stripe_multibanco'] = __( 'Stripe Multibanco', 'woocommerce-gateway-stripe' );
358
+				$sections['stripe_bancontact'] = __('Stripe Bancontact', 'woocommerce-gateway-stripe');
359
+				$sections['stripe_sofort']     = __('Stripe SOFORT', 'woocommerce-gateway-stripe');
360
+				$sections['stripe_giropay']    = __('Stripe Giropay', 'woocommerce-gateway-stripe');
361
+				$sections['stripe_eps']        = __('Stripe EPS', 'woocommerce-gateway-stripe');
362
+				$sections['stripe_ideal']      = __('Stripe iDeal', 'woocommerce-gateway-stripe');
363
+				$sections['stripe_p24']        = __('Stripe P24', 'woocommerce-gateway-stripe');
364
+				$sections['stripe_alipay']     = __('Stripe Alipay', 'woocommerce-gateway-stripe');
365
+				$sections['stripe_sepa']       = __('Stripe SEPA Direct Debit', 'woocommerce-gateway-stripe');
366
+				$sections['stripe_multibanco'] = __('Stripe Multibanco', 'woocommerce-gateway-stripe');
367 367
 
368 368
 				return $sections;
369 369
 			}
@@ -374,16 +374,16 @@  discard block
 block discarded – undo
374 374
 			 * @param WC_Email[] $email_classes All existing emails.
375 375
 			 * @return WC_Email[]
376 376
 			 */
377
-			public function add_emails( $email_classes ) {
377
+			public function add_emails($email_classes) {
378 378
 				require_once WC_STRIPE_PLUGIN_PATH . '/includes/compat/class-wc-stripe-email-failed-authentication.php';
379 379
 				require_once WC_STRIPE_PLUGIN_PATH . '/includes/compat/class-wc-stripe-email-failed-renewal-authentication.php';
380 380
 				require_once WC_STRIPE_PLUGIN_PATH . '/includes/compat/class-wc-stripe-email-failed-preorder-authentication.php';
381 381
 				require_once WC_STRIPE_PLUGIN_PATH . '/includes/compat/class-wc-stripe-email-failed-authentication-retry.php';
382 382
 
383 383
 				// Add all emails, generated by the gateway.
384
-				$email_classes['WC_Stripe_Email_Failed_Renewal_Authentication']  = new WC_Stripe_Email_Failed_Renewal_Authentication( $email_classes );
385
-				$email_classes['WC_Stripe_Email_Failed_Preorder_Authentication'] = new WC_Stripe_Email_Failed_Preorder_Authentication( $email_classes );
386
-				$email_classes['WC_Stripe_Email_Failed_Authentication_Retry'] = new WC_Stripe_Email_Failed_Authentication_Retry( $email_classes );
384
+				$email_classes['WC_Stripe_Email_Failed_Renewal_Authentication']  = new WC_Stripe_Email_Failed_Renewal_Authentication($email_classes);
385
+				$email_classes['WC_Stripe_Email_Failed_Preorder_Authentication'] = new WC_Stripe_Email_Failed_Preorder_Authentication($email_classes);
386
+				$email_classes['WC_Stripe_Email_Failed_Authentication_Retry'] = new WC_Stripe_Email_Failed_Authentication_Retry($email_classes);
387 387
 
388 388
 				return $email_classes;
389 389
 			}
Please login to merge, or discard this patch.