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:

functions.php
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.

  1. WooCommerce icon WooCommerce7+ million installs do_action( 'woocommerce_refund_deleted', $refund_id, $order_id ) includes/class-wc-ajax.php:3015
  2. WooPayments: Integrated WooCommerce Payments icon 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
  3. WooCommerce Stripe Payment Gateway icon WooCommerce Stripe Payment Gateway700,000+ installs do_action( 'woocommerce_refund_deleted', $refund_id, $order_id ) includes/class-wc-stripe-webhook-handler.php:1148
  4. Payoneer Checkout icon Payoneer Checkout5,000+ installs do_action( 'woocommerce_refund_deleted', $refund_id, $order->get_id() ) includes/Gateways/WC_Payoneer_Gateway.php:1660
  5. 우커머스 네이버페이 icon 우커머스 네이버페이200+ installs do_action( 'woocommerce_refund_deleted', $refund_id, $order_id ) includes/class-mnp-order.php:306
  6. Super Payments icon Super Payments200+ installs do_action( 'woocommerce_refund_deleted', $woo_refund_id, $order_id ) include/webhooks/refunds.php:64
  7. Payment Gateway for WooCommerce with Stripe icon Payment Gateway for WooCommerce with Stripe80+ installs do_action( 'woocommerce_refund_deleted', $refund_id, $order_id ) includes/core/stripe-webhook.php:297
  8. MoneyCollect Payment Gateway for WooCommerce icon MoneyCollect Payment Gateway for WooCommerce20+ installs do_action( 'woocommerce_refund_deleted', $refund_id, $order_id ) includes/class-wc-mc-webhook.php:119
  9. AsiaBill Payment Gateway for WooCommerce icon AsiaBill Payment Gateway for WooCommerce10+ installs do_action( 'woocommerce_refund_deleted', $refund_id, $order_id ) includes/class-wc-asiabill-webhook.php:68
  10. Xaurr for WooCommerce icon Xaurr for WooCommerceFewer than 10 installs do_action( 'woocommerce_refund_deleted', (int) $pending_id, $order->get_id() ) includes/class-xaurr-gateway.php:439
  11. PayRivet Payments with Stripe for WooCommerce icon 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
  12. Invoice management for Woocommerce icon 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.