Learn in this code tutorial how to prevent WooCommerce from sending you the emails related to stock management.
If you use WooCommerce and you have products with stock management you will receive, by default, the emails related to it (few products left, no products left…).
This is fine, but sometimes you don’t want to receive this kind of emails (I say this from experience). Luckily, we can use a WooCommerce hook to disable them.
Here’s how to do it.
Snippet to avoid sending product stock status emails in WooCommerce
Add the following code at the end of functions.php or in your functionality plugin:
In this case, you remove the functions responsible for sending emails about the stock of the product, hooking it to the filter
In addition, you can combine this code with some conditional to customize it to your liking.
You can see that with a few lines of code you can remove product stock management emails from WooCommerce.
Any questions? Let me know in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉