No, and Low, Stock Notifications
-
I’m not sure if this is the right place to post this or if it should be a GitHub issue, but I’m looking to find out how the Low (and No) stock notifications are going to work in future. I was using a clone of the latest code in the GitHub repository to test an extension I’m working on, and discovered I wasn’t receiving these notifications.
In the latest official release of the code it’s relatively easy to trace the hooks back to
woocommerce_low_stock
which gets triggered in thesend_notifications
methods ofabstract-wc-order.php
. However, in the latest code this has been deprecated and the whole class moved toabstract-wc-legacy-order.php
. There’s also a comment about it not needing to be explicitly called. In theclass-wc-order.php
file there’s thepayment_complete
method that’s documented as having the stock levels being reduced, but I can’t see where that happens either!Searching the entire code base I can’t find any reference to the
woocommerce_notify_low_stock
andwoocommerce_notify_no_stock
settings apart from in the reports and for displaying the product availability text.As my extension needs to hook in to these notifications I’d like to make sure that I’m doing it in a future-proof way, or at least I’m aware how to fix it when 2.7 is released. I’m sure I’m just being dumb or code blind, but can someone let me know where these notifications are triggered?
Thanks in advance!
- The topic ‘No, and Low, Stock Notifications’ is closed to new replies.