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

Hook rest_insert_comment object does not have comment_ID #2340

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.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions