do_action( ‘wp_set_comment_status’, string $comment_id, string $comment_status )

In this article

Fires immediately after transitioning a comment’s status from one to another in the database and removing the comment from the object cache, but prior to all status transition hooks.

Parameters

$comment_idstring
Comment ID as a numeric string.
$comment_statusstring
Current comment status. Possible values include 'hold', '0', 'approve', '1', 'spam', and 'trash'.

Source

do_action( 'wp_set_comment_status', $comment->comment_ID, $comment_status );

Changelog

VersionDescription
1.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.