Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 494-497 (lines=4) @@
491
	 * @throws WC_Stripe_Exception     An exception if the source ID is missing.
492
	 */
493
	public function check_source( $prepared_source ) {
494
		if ( empty( $prepared_source->source ) ) {
495
			$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );
496
			throw new WC_Stripe_Exception( print_r( $prepared_source, true ), $localized_message );
497
		}
498
	}
499
500
	/**

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

@@ 178-181 (lines=4) @@
175
			$subscription    = wc_get_order( $order_id );
176
			$prepared_source = $this->prepare_source( get_current_user_id(), true );
177
178
			if ( empty( $prepared_source->source ) ) {
179
				$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );
180
				throw new WC_Stripe_Exception( print_r( $prepared_source, true ), $localized_message );
181
			}
182
183
			$this->save_source_to_order( $subscription, $prepared_source );
184