Code Duplication    Length = 4-4 lines in 3 locations

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

@@ 133-136 (lines=4) @@
130
			$subscription    = wc_get_order( $order_id );
131
			$prepared_source = $this->prepare_source( get_current_user_id(), true );
132
133
			if ( empty( $prepared_source->source ) ) {
134
				$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );
135
				throw new WC_Stripe_Exception( print_r( $prepared_source, true ), $localized_message );
136
			}
137
138
			$this->save_source_to_order( $subscription, $prepared_source );
139

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

@@ 95-98 (lines=4) @@
92
				throw new WC_Stripe_Exception( print_r( $source_object, true ), $localized_message );
93
			}
94
95
			if ( empty( $prepared_source->source ) ) {
96
				$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );
97
				throw new WC_Stripe_Exception( print_r( $prepared_source, true ), $localized_message );
98
			}
99
100
			$this->save_source_to_order( $subscription, $prepared_source );
101

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

@@ 693-696 (lines=4) @@
690
				throw new WC_Stripe_Exception( print_r( $prepared_source->source_object, true ), $localized_message );
691
			}
692
693
			if ( empty( $prepared_source->source ) ) {
694
				$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );
695
				throw new WC_Stripe_Exception( print_r( $prepared_source, true ), $localized_message );
696
			}
697
698
			$this->save_source_to_order( $order, $prepared_source );
699