Skip to content

Commit

Permalink
Unset receipt_email if it is not a valid email
Browse files Browse the repository at this point in the history
  • Loading branch information
takayukister committed Aug 24, 2021
1 parent 42e8d7e commit 0afd6f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/stripe/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public function create_payment_intent( $args = '' ) {
'receipt_email' => '',
) );

if ( ! is_email( $args['receipt_email'] ) ) {
unset( $args['receipt_email'] );
}

$endpoint = 'https://api.stripe.com/v1/payment_intents';

$request = array(
Expand Down

0 comments on commit 0afd6f7

Please sign in to comment.