diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index 68cc772e93..a7282e4e95 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -1588,6 +1588,9 @@ function wp_insert_comment( $commentdata ) { if ( $comment_approved == 1 ) { wp_update_comment_count( $comment_post_ID ); } + + clean_comment_cache( $id ); + $comment = get_comment( $id ); // If metadata is provided, store it. @@ -1607,8 +1610,6 @@ function wp_insert_comment( $commentdata ) { */ do_action( 'wp_insert_comment', $id, $comment ); - wp_cache_set( 'last_changed', microtime(), 'comment' ); - return $id; }