ad94888ce3
* Ensure stock change notifs only fire when necessary In #49583 we changed when the actions that trigger stock change notifications fire, to decouple them from order creation. However, it turns out what during product creation, the stock quantity update routines still run even when no stock is being set and even when the "manage stock" setting is set to false. Rather than try to untangle the web of why this happens (and potentially break other things in the process), this simply adds a check for the "manage stock" setting prior to firing the notif actions, and bail early if the product does not have managed stock. It also adds a unit test, which is really more of an integration test, to ensure this behavior. Fixes #50958 * Remove irrelevant doc block info In #49583 we added a second parameter to the `woocommerce_variation_set_stock` and `woocommerce_product_set_stock` action hooks, but it was later removed. However, we didn't remove the corresponding doc block info. * Add changelog file --------- Co-authored-by: Naman Malhotra <naman03malhotra@gmail.com> |
||
---|---|---|
.. | ||
woo-ai | ||
woocommerce | ||
woocommerce-admin | ||
woocommerce-beta-tester | ||
woocommerce-blocks |