wpDiscuz 7 API Documentation

⌘K
  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentat...
  4. Actions
  5. wpdiscuz_after_comment_post

wpdiscuz_after_comment_post

This hook can be used for doing some action after adding comments.

Changelog

since 7.0.0 version

Parameters

1. $newComment (type: WP_Comment object) - the object of newly added comment
2. $currentUser (type: WP_User object) - the user object that is logged in at the current time

Usage

add_action("wpdiscuz_after_comment_post", function ($newComment, $currentUser) {
    $newCommentId = $newComment->comment_ID;
}, 10, 2);