woothemes/woocommerce — pull request #3564 by ragulka (2013-08-01 12:19:45+00:00)
Title: Add stock set, increase and reduce action hooks

This commit adds 3 new action hooks (in `abstract-wc-product.php`):

1. `woocommerce_product_set_stock` - triggered right after product stock has been set with the `set_stock` method.
2. `woocommerce_product_increase_stock` - triggered right after product stock has been increased with the `increase_stock` method
3. `woocommerce_product_reduce_stock` - triggered right after product stock has been reduced with the `reduce_stock` method.

The latter two hooks receive an extra argument `$by` which simply indicates the quantity the stock was reduced or increased by.

These hooks can be very useful when you want to trigger actions based on product stock changes. I am myself writing a plugin that very much benefits from these hooks.