WordPress filter hook
woocommerce_payment_successful_result
Defined by WooCommerce and fired by 15 plugins in total, running on 7M+ sites between them.
“This filter is documented in woocommerce/includes/class-wc-checkout.php.”
How to use woocommerce_payment_successful_result
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_payment_successful_result', function( $result, $order_id ) {
// Change $result here.
return $result;
}, 10, 2 );Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
15 plugins that fire woocommerce_payment_successful_result
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_payment_successful_result', $result, $order_id )includes/class-wc-checkout.php:1279 -
Payment Gateway for PayPal on WooCommerce10,000+ installs
apply_filters( 'woocommerce_payment_successful_result', array('result' => 'success'), $woo_order_id )ppcp/includes/class-ppcp-paypal-checkout-for-woocommerce-request.php:1659 -
Amazon Pay for WooCommerce10,000+ installs
apply_filters( 'woocommerce_payment_successful_result', $result, $order_id )includes/class-wc-gateway-amazon-payments-advanced.php:3096 -
Revolut Gateway for WooCommerce7,000+ installs
apply_filters( 'woocommerce_payment_successful_result', $result, $wc_order_id )includes/class-wc-revolut-payment-ajax-controller.php:152 -
PayPlug for WooCommerce (Official)4,000+ installs
apply_filters( 'woocommerce_payment_successful_result', $result, $order_id )src/PayplugWoocommerceRequest.php:274 -
Checkout with Zelle on Woocommerce3,000+ installs
apply_filters( 'woocommerce_payment_successful_result', $result, $order->get_id() )includes/class-wc_zelle_popup_order.php:284 -
Sezzle Woocommerce Payment1,000+ installs
apply_filters( 'woocommerce_payment_successful_result', ['result' => 'success', 'redirect' => $this->get_return_url($order)], $order->get_id() )woocommerce-gateway-sezzle.php:2383 -
Androapp300+ installs
apply_filters( 'woocommerce_payment_successful_result', $result, $orderId )class-pw-wp-woo.php:1445 -
Bolt Checkout for WooCommerce100+ installs
apply_filters( 'woocommerce_payment_successful_result', $result, $order_id )includes/classes/class-bolt-checkout.php:1057 -
BlueSnap Payment Gateway for WooCommerce90+ installs
apply_filters( 'woocommerce_payment_successful_result', $result, $order_id )includes/class-wc-bluesnap-payment-request.php:491 -
Radin app10+ installs
apply_filters( 'woocommerce_payment_successful_result', $result, $order->get_id() )includes/API/Controller/OrderControllerRadinapp.php:195 -
Briqpay for WooCommerce10+ installs
apply_filters( 'woocommerce_payment_successful_result', array('result' => 'success', 'redirect' => $url), $order->get_id() )includes/class-checkout-handler.php:3072 -
Raif payment10+ installs
apply_filters( 'woocommerce_payment_successful_result', $result, $order_id )includes/class-gateway.php:787 -
Vanquish DepositsFewer than 10 installs
apply_filters( 'woocommerce_payment_successful_result', $result, $first->get_id() )includes/Checkout/Classic.php:68 -
Single Page ShoppingFewer than 10 installs
apply_filters( 'woocommerce_payment_successful_result', $result, $order_id )includes/class-awcs-form-handler.php:498
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.