WordPress action hook
woocommerce_refund_deleted
Defined by WooCommerce and fired by 12 plugins in total, running on 8.5M+ sites between them.
How to use woocommerce_refund_deleted
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( 'woocommerce_refund_deleted', function( $refund_id, $order_id ) {
// Your code runs here.
}, 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.
12 plugins that fire woocommerce_refund_deleted
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
do_action( 'woocommerce_refund_deleted', $refund_id, $order_id )includes/class-wc-ajax.php:3015 -
WooPayments: Integrated WooCommerce Payments800,000+ installs
do_action( 'woocommerce_refund_deleted', $refund_id, $parent_order_id )includes/migrations/class-wc-payments-remediate-canceled-auth-fees.php:720 -
WooCommerce Stripe Payment Gateway700,000+ installs
do_action( 'woocommerce_refund_deleted', $refund_id, $order_id )includes/class-wc-stripe-webhook-handler.php:1148 -
Payoneer Checkout5,000+ installs
do_action( 'woocommerce_refund_deleted', $refund_id, $order->get_id() )includes/Gateways/WC_Payoneer_Gateway.php:1660 -
우커머스 네이버페이200+ installs
do_action( 'woocommerce_refund_deleted', $refund_id, $order_id )includes/class-mnp-order.php:306 -
Super Payments200+ installs
do_action( 'woocommerce_refund_deleted', $woo_refund_id, $order_id )include/webhooks/refunds.php:64 -
Payment Gateway for WooCommerce with Stripe80+ installs
do_action( 'woocommerce_refund_deleted', $refund_id, $order_id )includes/core/stripe-webhook.php:297 -
MoneyCollect Payment Gateway for WooCommerce20+ installs
do_action( 'woocommerce_refund_deleted', $refund_id, $order_id )includes/class-wc-mc-webhook.php:119 -
AsiaBill Payment Gateway for WooCommerce10+ installs
do_action( 'woocommerce_refund_deleted', $refund_id, $order_id )includes/class-wc-asiabill-webhook.php:68 -
Xaurr for WooCommerceFewer than 10 installs
do_action( 'woocommerce_refund_deleted', (int) $pending_id, $order->get_id() )includes/class-xaurr-gateway.php:439 -
PayRivet Payments with Stripe for WooCommerceFewer than 10 installs
do_action( 'woocommerce_refund_deleted', $refund_id, $order_id )includes/class-wc-stripe-webhook-handler.php:1152 -
Invoice management for WoocommerceFewer than 10 installs
do_action( 'woocommerce_refund_deleted', $refund_id, $order_id )includes/class-wc-ajax.php:2129
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.