This hook allows you to perform an action when a user votes on a comment for the first time.
Changelog
Added starting from 7.0.0 version.
Parameters
1. $voteType (type: int) - the type of the vote (like or dislike).
2. $comment (type: WP_Comment object) - the object of the comment.
2. $comment (type: WP_Comment object) - the object of the comment.
Usage
add_action("wpdiscuz_add_vote", function ($voteType, $comment) {
if ($comment->user_id) {
update_user_meta($comment->user_id, "user_votes", intval(get_user_meta($comment->user_id, "user_votes", true)) + $voteType);
}
}, 10, 2);
