This hook can be used for doing some action before getting comments.
Changelog
since 7.0.0 version
Parameters
1. $commentsArgs (type: array) - the merged array that includes values of the default arguments and arguments that are passed to the function. The array should be passed to
2. $currentUser (type: WP_User object) - the user object that is logged in at the current time
3. $args (type: array) - the arguments that are passed to the function
get_comments() function. 2. $currentUser (type: WP_User object) - the user object that is logged in at the current time
3. $args (type: array) - the arguments that are passed to the function
Usage
add_action("wpdiscuz_before_getcomments", function ($commentsArgs, $currentUser, $args) {
if (!empty($currentUser->ID)) {
$customValues = $this->init_custom_actions();
}
}, 10, 3);