includes/class-wc-stripe-customer.php 1 location
|
@@ 165-167 (lines=3) @@
|
162 |
|
$args = $this->generate_customer_request( $args ); |
163 |
|
$response = WC_Stripe_API::request( apply_filters( 'wc_stripe_create_customer_args', $args ), 'customers' ); |
164 |
|
|
165 |
|
if ( ! empty( $response->error ) ) { |
166 |
|
throw new WC_Stripe_Exception( print_r( $response, true ), $response->error->message ); |
167 |
|
} |
168 |
|
|
169 |
|
$this->set_id( $response->id ); |
170 |
|
$this->clear_cache(); |
includes/abstracts/abstract-wc-stripe-payment-gateway.php 1 location
|
@@ 682-684 (lines=3) @@
|
679 |
|
if ( $this->should_save_payment_method( $source_object, $customer, $force_save_source ) ) { |
680 |
|
$response = $customer->add_source( $source_id ); |
681 |
|
|
682 |
|
if ( ! empty( $response->error ) ) { |
683 |
|
throw new WC_Stripe_Exception( print_r( $response, true ), $this->get_localized_error_message_from_response( $response ) ); |
684 |
|
} |
685 |
|
|
686 |
|
$source_id = $response; |
687 |
|
if ( empty( $source_object ) ) { |