Action hook 'wp_set_comment_status'

in WP Core File wp-includes/comment.php at line 1509

Description

Fires immediately after a comment is deleted from the database.

Occurrences

Filename Line Number
wp-includes/comment.php 1509
wp-includes/comment.php 2455

Parameters

Type Name Description
string $comment_id The comment ID as a numeric string.
WP_Comment $comment The deleted comment.

Usage Examples

Example 1

add_action( 'wp_set_comment_status', 'wp_new_comment_notify_postauthor'

PHP Doc

/**
	 * Fires immediately after a comment is deleted from the database.
	 *
	 * @since 2.9.0
	 * @since 4.9.0 Added the `$comment` parameter.
	 *
	 * @param string     $comment_id The comment ID as a numeric string.
	 * @param WP_Comment $comment    The deleted comment.
	 */