WordPress action hook
wc_gateway_stripe_process_payment_error
Fired by 7 WordPress plugins, running on 711K+ sites between them.
“This action is documented in includes/compat/trait-wc-stripe-subscriptions.php.”
How to use wc_gateway_stripe_process_payment_error
It's an action: your callback runs at that point and receives 2 arguments. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'wc_gateway_stripe_process_payment_error', function( $e, $order ) {
// Your code runs here.
}, 10, 2 );Argument names come from WooCommerce Stripe Payment Gateway's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
7 plugins that fire wc_gateway_stripe_process_payment_error
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce Stripe Payment Gateway700,000+ installs
do_action( 'wc_gateway_stripe_process_payment_error', $e, $order )includes/abstracts/abstract-wc-stripe-payment-gateway-voucher.php:298 -
Subscriptions for WooCommerce10,000+ installs
do_action( 'wc_gateway_stripe_process_payment_error', $e, $renewal_order )package/gateways/stripe/class-wps-subscriptions-payment-stripe.php:241 -
Subscriptions for WooCommerce with Stripe Recurring Payments1,000+ installs
do_action( 'wc_gateway_stripe_process_payment_error', $e, $renewal_order )includes/Illuminate/Gateways/Stripe/Stripe.php:241 -
SUBRE100+ installs
do_action( 'wc_gateway_stripe_process_payment_error', $e, $renewal_order )includes/payment/stripe.php:281 -
Marketing 360® Payments for WooCommerce30+ installs
do_action( 'wc_gateway_stripe_process_payment_error', $e, $order )includes/class-wc-gateway-stripe.php:794 -
Terminal for Stripe and WooCommerce20+ installs
do_action( 'wc_gateway_stripe_process_payment_error', $e, $order )includes/payment-methods/tfsw-gateway-stripe-terminal.php:585 -
Subscription for WooCommerce by Flexi Subscription20+ installs
do_action( 'wc_gateway_stripe_process_payment_error', $exception, $renewal_order )src/Application/Gateways/Stripe/Stripe.php:234
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.