Code Duplication    Length = 5-5 lines in 2 locations

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

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

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

@@ 724-728 (lines=5) @@
721
			$order  = wc_get_order( $order_id );
722
			$source = $this->get_source( get_current_user_id(), $force_customer );
723
724
			if ( empty( $source->source ) && empty( $source->customer ) ) {
725
				$error_msg = __( 'Please enter your card details to make a payment.', 'woocommerce-gateway-stripe' );
726
				$error_msg .= ' ' . __( 'Developers: Please make sure that you are including jQuery and there are no JavaScript errors on the page.', 'woocommerce-gateway-stripe' );
727
				throw new Exception( $error_msg );
728
			}
729
730
			// Store source to order meta.
731
			$this->save_source( $order, $source );