Uncaught TypeError in WC_Stripe_API::detach_payment_method_from_customer() | WordPress.org

[ad_1]

Hi,

we are seeing some fatal errors in our PHP error log that are caused by the Stripe plugin. They seem to occur when a credit card payment fails. Here is the stack trace:

PHP Fatal error:  Uncaught TypeError: WC_Stripe_API::detach_payment_method_from_customer(): Argument #2 ($payment_method_id) must be of type string, null given, called in /wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-customer.php on line 489 and defined in /wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-api.php:327
Stack trace:
#0 /wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-customer.php(489): WC_Stripe_API::detach_payment_method_from_customer()
#1 /wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-intent-controller.php(133): WC_Stripe_Customer->delete_source()
#2 /wp-includes/class-wp-hook.php(324): WC_Stripe_Intent_Controller->verify_intent()
#3 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#4 /wp-includes/plugin.php(517): WP_Hook->do_action()
#5 /wp-content/plugins/woocommerce/includes/class-wc-ajax.php(96): do_action()
#6 /wp-includes/class-wp-hook.php(324): WC_AJAX::do_wc_ajax()
#7 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#8 /wp-includes/plugin.php(517): WP_Hook->do_action()
#9 /wp-includes/template-loader.php(13): do_action()
#10 /wp-blog-header.php(19): require_once('...')
#11 /index.php(17): require('...')
#12 {main}
thrown in /wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-stripe-api.php on line 327

Thank you for looking into it!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer