wpDiscuz 7 API Documentation

⌘K
  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentat...
  4. Filters
  5. wpdiscuz_send_email_on_approving

wpdiscuz_send_email_on_approving

This hook can be used for either sending the email if the comment is approved or not. If the “Notify comment author once comment is approved” option is disabled the hook will not work.

Changelog

since 7.2.0 version

Parameters

1. $sendMail (type: bool) - if the mail should be sent to comment author or not
2. $email (type: array) - the email of the user, whom the email should be sent
3. $comment (type: WP_Comment object) - the object of the comment

Usage

add_filter("wpdiscuz_send_email_on_approving", function ($sendMail, $email, $comment) {
    return false;
}, 10, 3);