• Resolved jodybdesigns

    (@jodybdesigns)


    I have disabled all of the Dokan email options in Woocommerce>Settings>Emails and I only have my email address in Woocommerce>Products>Inventory>Notification recipients. How do I disable the vendors from receiving low stock and out of stock emails?

    • This topic was modified 2 years, 3 months ago by jodybdesigns.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @jodybdesigns ,

    The low stock and no stock emails are getting triggered by a hook in Dokan from WooCommerce. To remove this you will have to do some customization.

    You need to remove these filters so that vendor gets no email: “woocommerce_email_recipient_no_stock” and “woocommerce_email_recipient_low_stock”

    Or remove line number 2280-2289 from this file of Dokan lite: wp-content/plugins/dokan-lite/includes/functions.php and the vendor will not get any email for low stock or no stock.

    Hope this helps.

    Best Regards!

    Thread Starter jodybdesigns

    (@jodybdesigns)

    Thank you Yusuf. Commenting out the code in the includes/functions.php file did the trick. This is resolved.

    Hello @jodybdesigns ,

    Glad to know that worked out for you. But FYI, if you update Dokan, that file will be changed again to its default state and the customization you have done will be lost.

    So, for a better approach, I would suggest you use the remove_filter function to remove those filters in your child theme’s function.php file. In this way, even if you update Dokan, the changes will remain and will not be lost.

    You can copy-paste the below-given code to your child theme’s function.php file and your vendor will not get any email for low/no stock.

    remove_filter( 'woocommerce_email_recipient_no_stock', 'dokan_wc_email_recipient_add_seller_no_stock', 15, 2 );

    remove_filter( 'woocommerce_email_recipient_low_stock', 'dokan_wc_email_recipient_add_seller_no_stock', 15, 2 );

    If you do not know how to create a child theme, then you may follow this instruction.

    Hope this helps.

    Regards!

    Hello @jodybdesigns ,

    Due to inactivity, I am marking this topic as resolved. Feel free to open a new one if you face any further queries.

    Best Regards!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove vendor from low stock and out of stock emails’ is closed to new replies.