Code Duplication    Length = 3-3 lines in 2 locations

includes/compat/class-wc-stripe-compat.php 1 location

@@ 441-443 (lines=3) @@
438
439
			if ( ! isset( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) || empty( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) ) {
440
				throw new Exception( __( 'A "Stripe Customer ID" value is required.', 'woocommerce-gateway-stripe' ) );
441
			} elseif ( 0 !== strpos( $payment_meta['post_meta']['_stripe_customer_id']['value'], 'cus_' ) ) {
442
				throw new Exception( __( 'Invalid customer ID. A valid "Stripe Customer ID" must begin with "cus_".', 'woocommerce-gateway-stripe' ) );
443
			}
444
445
			if (
446
				( ! empty( $payment_meta['post_meta']['_stripe_source_id']['value'] )

includes/compat/class-wc-stripe-sepa-compat.php 1 location

@@ 352-354 (lines=3) @@
349
350
			if ( ! isset( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) || empty( $payment_meta['post_meta']['_stripe_customer_id']['value'] ) ) {
351
				throw new Exception( 'A "_stripe_customer_id" value is required.' );
352
			} elseif ( 0 !== strpos( $payment_meta['post_meta']['_stripe_customer_id']['value'], 'cus_' ) ) {
353
				throw new Exception( 'Invalid customer ID. A valid "_stripe_customer_id" must begin with "cus_".' );
354
			}
355
356
			if ( ! isset( $payment_meta['post_meta']['_stripe_source_id']['value'] ) || empty( $payment_meta['post_meta']['_stripe_source_id']['value'] ) ) {
357
				throw new Exception( 'A "_stripe_source_id" value is required.' );