wpDiscuz 7 API Documentation

  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentation
  4. Actions
  5. wpdiscuz_before_sending_emails
Generic selectors
Exact matches only
Search in title
Search in content

wpdiscuz_before_sending_emails

This action works before the “subscribe” and “follow” mails are being sent.

Changelog

since 7.1.0 version

Parameters

1. $commentId (type: int) – the ID of the comment, for which the emails are being sent
2. $comment (type: WP_Comment object) – the object of the comment

Usage

add_action("wpdiscuz_before_sending_emails", function ($commentId, $comment) {
    if (function_exists("my_custom_function")) {
        my_custom_function($commentId);
    }
}, 10, 2);

Was this article helpful to you? Yes No