Fires completely after a comment is created or updated via the REST API.
$commentWP_Comment$requestWP_REST_Request$creatingboolwp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php:769WP_REST_Comments_Controller::create_item()wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php:923WP_REST_Comments_Controller::update_item() * * @param WP_Comment $comment Inserted or updated comment object. * @param WP_REST_Request $request Request object. * @param bool $creating True when creating a comment, false * when updating. */ do_action( 'rest_after_insert_comment', $comment, $request, true ); $response = $this->prepare_item_for_response( $comment, $request ); $response = rest_ensure_response( $response ); $response->set_status( 201 ); $response->header( 'Location', rest_url( sprintf( '%s/%s/%d', $this->namespace, $this->rest_base, $comment_id ) ) );Introduced in 5.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.