Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 745-749 (lines=5) @@
742
			$order  = wc_get_order( $order_id );
743
			$source = $this->get_source( get_current_user_id(), $force_customer );
744
745
			if ( empty( $source->source ) && empty( $source->customer ) ) {
746
				$error_msg = __( 'Please enter your card details to make a payment.', 'woocommerce-gateway-stripe' );
747
				$error_msg .= ' ' . __( 'Developers: Please make sure that you are including jQuery and there are no JavaScript errors on the page.', 'woocommerce-gateway-stripe' );
748
				throw new Exception( $error_msg );
749
			}
750
751
			// Store source to order meta.
752
			$this->save_source( $order, $source );

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

@@ 435-439 (lines=5) @@
432
			$order  = wc_get_order( $order_id );
433
			$source = $this->get_source( get_current_user_id(), $force_customer );
434
435
			if ( empty( $source->source ) && empty( $source->customer ) ) {
436
				$error_msg = __( 'Please enter your card details to make a payment.', 'woocommerce-gateway-stripe' );
437
				$error_msg .= ' ' . __( 'Developers: Please make sure that you are including jQuery and there are no JavaScript errors on the page.', 'woocommerce-gateway-stripe' );
438
				throw new Exception( $error_msg );
439
			}
440
441
			// Store source to order meta
442
			$this->save_source( $order, $source );