diff --git a/changelog.txt b/changelog.txt index 3d4c2d57b..4a21004fa 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,7 @@ *** Changelog *** = 9.2.0 - xxxx-xx-xx = +* Fix - Fixes an error with the fingerprint property setting when using the legacy checkout. * Fix - Fixes order attribution data for the Express Checkout Element when using the Blocks API to process. * Tweak - Process ECE orders using the Blocks API. * Fix - Fixes incorrect error message for card failures due insufficient funds on the shortcode checkout page (legacy). diff --git a/includes/payment-tokens/class-wc-stripe-payment-tokens.php b/includes/payment-tokens/class-wc-stripe-payment-tokens.php index ba44bbed8..9732f72ee 100644 --- a/includes/payment-tokens/class-wc-stripe-payment-tokens.php +++ b/includes/payment-tokens/class-wc-stripe-payment-tokens.php @@ -183,9 +183,11 @@ public function woocommerce_get_customer_payment_tokens_legacy( $tokens, $custom $token->set_last4( $source->card->last4 ); $token->set_expiry_month( $source->card->exp_month ); $token->set_expiry_year( $source->card->exp_year ); + if ( isset( $source->card->fingerprint ) ) { + $token->set_fingerprint( $source->card->fingerprint ); + } } - $token->set_fingerprint( $source->fingerprint ); $token->set_user_id( $customer_id ); $token->save(); $tokens[ $token->get_id() ] = $token; @@ -221,7 +223,9 @@ public function woocommerce_get_customer_payment_tokens_legacy( $tokens, $custom $token->set_gateway_id( WC_Gateway_Stripe_Sepa::ID ); $token->set_last4( $source->sepa_debit->last4 ); $token->set_user_id( $customer_id ); - $token->set_fingerprint( $source->fingerprint ); + if ( isset( $source->sepa_debit->fingerprint ) ) { + $token->set_fingerprint( $source->sepa_debit->fingerprint ); + } $token->save(); $tokens[ $token->get_id() ] = $token; } else { diff --git a/readme.txt b/readme.txt index bf2fa5def..10ddd143f 100644 --- a/readme.txt +++ b/readme.txt @@ -111,6 +111,7 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o == Changelog == = 9.2.0 - xxxx-xx-xx = +* Fix - Fixes an error with the fingerprint property setting when using the legacy checkout. * Fix - Fixes order attribution data for the Express Checkout Element when using the Blocks API to process. * Tweak - Process ECE orders using the Blocks API. * Fix - Fixes incorrect error message for card failures due insufficient funds on the shortcode checkout page (legacy).