From 857647cc06334e1713e12696eeeaa0fbff5cf35f Mon Sep 17 00:00:00 2001 From: danielvonmitschke Date: Fri, 1 Jul 2016 12:53:08 +0200 Subject: [PATCH] Added '$_product' argument to 'woocommerce_restock_refunded_item' hook currently the hook is only using $_product->id but it might be useful not to only know the product but also the explicit variation that was refunded. --- includes/class-wc-ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 732e77965bd..2cb11fb2e67 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -2246,7 +2246,7 @@ class WC_AJAX { $order->add_order_note( sprintf( __( 'Item #%s stock increased from %s to %s.', 'woocommerce' ), $order_item['product_id'], $old_stock, $new_quantity ) ); - do_action( 'woocommerce_restock_refunded_item', $_product->id, $old_stock, $new_quantity, $order ); + do_action( 'woocommerce_restock_refunded_item', $_product->id, $old_stock, $new_quantity, $order, $_product ); } } }