You can use “save_post” action-hook
Add the code below into functions.php and enchance with your comment_meta code.
function update_comments_meta( $post_id ) {
// Do whatever add/update_comment_meta code you need
}
add_action( 'save_post', 'update_comments_meta' );
UPDATE.
As an example i’ve attach code below. It performs on post save/update action fired. Code gets current post comments (all) then looping through received comment object it launch update_comment_meta
with ID extracted from comments object.
function update_comments_meta($post_id) {
$args = array(
'post_id' => $post_id,
);
$comments = get_comments($args);
if (!empty($comments))
foreach ($comments as $comment) {
update_comment_meta($comment->comment_ID, 'YOUR_META_KEY', 'YOUR_META_VALUE');
}
}
add_action('save_post', 'update_comments_meta');
Hope this is the case that you where interested in. Code tested on 4.3 twentyfifteen.
Refferences: