I am using Woocommerce plugin for my custom product .and I am stuck with a situation .

Does Woo commerce provide any hook or filter when refund is done through admin panel and refund will be manually.For More details please see attached image

  • 2
    When that button is clicked, javascript is called to update the UI to show refund options. It will not trigger any hook. Do you mean to ask if any hooks are triggered when such a refund is confirmed? Aug 30, 2017 at 16:41

3 Answers 3


Although this answer is little late but anyone else may get benefit from it. The woocommerce_order_refunded hook is called when an order is refunded. Use the following example:

// add the action 
add_action( 'woocommerce_order_refunded', 'action_woocommerce_order_refunded', 10, 2 ); 
// Do the magic
function action_woocommerce_order_refunded( $order_id, $refund_id ) 
  // Your code here
  • i am newby here but its perfect answer for me. thanks buddy @Tech Dog Feb 1, 2019 at 10:42
  • i have small question from which table i will get refund objec Feb 1, 2019 at 11:12

My answer is for emails or when refunds are done through the payment gateway but it might help someone coming across this. So in addition to Tech Dog's answer You can use a few other hooks specifically for partial refunds: woocommerce_order_partially_refunded and for full refunds: woocommerce_order_fully_refunded

These hooks can be seen here (I copied the lines at version 5.9 of WooCommerce, so depending on when someone is reading this the hooks might be on different lines in the latest version)


In the latest version of WooCommerce the following hooks are fired when an order is refunded:

  1. Either woocommerce_order_fully_refunded or woocommerce_order_partially_refunded hook
  2. A bunch of hooks which are always fired when an order status is changed, you can find them here https://rudrastyh.com/woocommerce/order-lifecycle-hooks.html#order-status-changed
  3. and the last one woocommerce_order_refunded

p.s. I mentioned the hooks in the same order they are going to be fired.

Example 1:

add_action( 'woocommerce_order_fully_refunded', function( $order_id, $refund_id ) {

    // enter your code here

}, 20, 2 );

Example 2:

add_action( 'woocommerce_order_partially_refunded', function( $order_id, $refund_id ) {
        // enter your code here
}, 20, 2 );

Example 3:

add_action( 'woocommerce_order_refunded', function( $order_id, $refund_id ) {
     // enter your code here
}, 20, 2 );

As you can see all of them have the same arguments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.