@@ 393-396 (lines=4) @@ | ||
390 | $stripe_customer_id = ''; |
|
391 | ||
392 | // First check the customer meta of purchase email. |
|
393 | if ( class_exists( 'Give_DB_Donor_Meta' ) && is_email( $user_id_or_email ) ) { |
|
394 | $donor = new Give_Donor( $user_id_or_email ); |
|
395 | $stripe_customer_id = $donor->get_meta( give_stripe_get_customer_key() ); |
|
396 | } |
|
397 | ||
398 | // If not found via email, check user_id. |
|
399 | if ( class_exists( 'Give_DB_Donor_Meta' ) && empty( $stripe_customer_id ) ) { |
|
@@ 399-402 (lines=4) @@ | ||
396 | } |
|
397 | ||
398 | // If not found via email, check user_id. |
|
399 | if ( class_exists( 'Give_DB_Donor_Meta' ) && empty( $stripe_customer_id ) ) { |
|
400 | $donor = new Give_Donor( $user_id, true ); |
|
401 | $stripe_customer_id = $donor->get_meta( give_stripe_get_customer_key() ); |
|
402 | } |
|
403 | ||
404 | // Get user ID from customer. |
|
405 | if ( is_email( $user_id_or_email ) && empty( $stripe_customer_id ) ) { |