Questions says it pretty much … Is it possible to change the comment meta for all comments of a specific post?

I know it probably works like this:

$comments = get_comments( array(

    'post_id' => $post->ID,

) );

foreach( $comments as $comment ) {

    update_comment_meta( $comment->comment_ID, 'accepted', '0' );


But is there a more elegant approach?

Read more here: Update comment meta for all comments of specific post


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: