This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Description
Seem the hook rest_insert_comment does not work as expected. It is fired after a comment is created or updated, so I expect it has a comment_ID but actually it not.
/**
* Fires after a comment is created or updated via the REST API.
*
* @param array $prepared_comment Inserted comment data.
* @param WP_REST_Request $request The request sent to the API.
* @param boolean $creating True when creating a comment, false when updating.
*/
do_action( 'rest_insert_comment', $prepared_comment, $request, true );
The implementation passes $prepared_comment in but not $comment and missing the ID.
Please correct me if I am wrong.