WordPress action hook

wc_gateway_stripe_process_redirect_payment_error

Fired by 3 WordPress plugins, running on 710K+ sites between them.

“Fires after redirect payment processing fails.”

How to use wc_gateway_stripe_process_redirect_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:

functions.php
add_action( 'wc_gateway_stripe_process_redirect_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.

3 plugins that fire wc_gateway_stripe_process_redirect_payment_error

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce Stripe Payment Gateway icon WooCommerce Stripe Payment Gateway700,000+ installs do_action( 'wc_gateway_stripe_process_redirect_payment_error', $e, $order ) includes/class-wc-stripe-order-handler.php:273
  2. WCFM Marketplace icon WCFM Marketplace10,000+ installs do_action( 'wc_gateway_stripe_process_redirect_payment_error', $e, $order ) includes/wcfm-stripe/class-wcfm-stripe-order-handler.php:186
  3. Marketing 360® Payments for WooCommerce icon Marketing 360® Payments for WooCommerce30+ installs do_action( 'wc_gateway_stripe_process_redirect_payment_error', $e, $order ) includes/class-wc-stripe-order-handler.php:186

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.