Introduces the woocommerce_restock_refunded_item and woocommerce_order_refunded actions, closes #6922

This commit is contained in:
Claudio Sanches 2014-12-19 10:29:47 -02:00
parent 9d7f14b2a4
commit 7e780a64b1
1 changed files with 4 additions and 0 deletions

View File

@ -1850,6 +1850,8 @@ class WC_AJAX {
$new_quantity = $_product->increase_stock( $qty );
$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 );
}
}
}
@ -1890,6 +1892,8 @@ class WC_AJAX {
}
}
do_action( 'woocommerce_order_refunded', $order_id, $refund->id );
// Clear transients
wc_delete_shop_order_transients( $order_id );