@@ 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 ); |
@@ 552-556 (lines=5) @@ | ||
549 | $order = wc_get_order( $order_id ); |
|
550 | $source = $this->get_source( get_current_user_id(), $force_customer ); |
|
551 | ||
552 | if ( empty( $source->source ) && empty( $source->customer ) ) { |
|
553 | $error_msg = __( 'Please enter your card details to make a payment.', 'woocommerce-gateway-stripe' ); |
|
554 | $error_msg .= ' ' . __( 'Developers: Please make sure that you are including jQuery and there are no JavaScript errors on the page.', 'woocommerce-gateway-stripe' ); |
|
555 | throw new Exception( $error_msg ); |
|
556 | } |
|
557 | ||
558 | // Store source to order meta. |
|
559 | $this->save_source( $order, $source ); |