Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical error on /checkout/ and /payment-methods/ pages for some customers with saved cards when legacy checkout is enabled #3718

Open
giilby opened this issue Jan 13, 2025 · 2 comments
Assignees
Labels
component: UPE Issues related to adding UPE functionality priority: medium The issue/PR is medium priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.

Comments

@giilby
Copy link

giilby commented Jan 13, 2025

Describe the bug
Some of our long-time customers who have multiple saved cards are currently not able to check out due to a regression bug in this plugin. The bug seems related to the changes in https://github.com/woocommerce/woocommerce-gateway-stripe/pull/3635/files. Here's the crash info:

WC_Stripe_Payment_Token_CC::set_fingerprint(): Argument #1 ($fingerprint) must be of type string, null given, called in /www/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-tokens/class-wc-stripe-payment-tokens.php on line 188

As far as I can tell, this is because the line should actually be $token->set_fingerprint( $source->card->fingerprint );, as Stripe's API doesn't return fingerprint at the root level of a source object. The same bug exists on a few other lines in this class as well.

To Reproduce
Steps to reproduce the behavior:

  1. Configure a test WP install with the WC, WC Stripe, and WC Subscriptions plugins
  2. Enable Stripe legacy checkout
  3. Add a credit card via the "Payment Methods" page
  4. Purchase a subscription, entering a different credit card during checkout
  5. Using a database admin tool, delete the first credit card you added from wp_woocommerce_payment_tokens to simulate the case where a card is defined in Stripe but not synced to the WC database
  6. Attempt to add another card via the "Payment Methods" page to trigger the bug

Expected behavior
The /checkout/ and /payment-methods/ pages do not crash when legacy checkout is enabled and customers have saved cards.

Environment (please complete the following information):

  • WordPress Version: 6.7.1
  • WooCommerce Version: 9.5.2
  • Stripe Plugin Version: 9.1.1
  • Browser [e.g. chrome, safari] and Version: N/A
  • Any other plugins installed: WooCommerce Subscriptions 7.1.0
@wjrosa wjrosa self-assigned this Jan 15, 2025
@wjrosa wjrosa added type: bug The issue is a confirmed bug. priority: medium The issue/PR is medium priority—it affects lots of customers substantially, but not critically. component: UPE Issues related to adding UPE functionality labels Jan 15, 2025
@johngiaccotto
Copy link

Is there an ETA for a new version of the plugin being released to resolve this? This is impacting one of our sites as well. Thank you.

@jchavez1531
Copy link

@johngiaccotto I chatted with Woocommerce support and they acknowledge the issue. We downgraded back to WooCommerce Stripe Gateway 9.0.0. And it is now working correctly. Hopefully there will be another update soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: UPE Issues related to adding UPE functionality priority: medium The issue/PR is medium priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

4 participants