I want to receive $comment_id in my custom function in my plugin. I mean when a user submit a comment, I need to pass $comment_id to add_custom_comment_page(). How can I do that?
inside my plugin:
$this->loader->add_action(‘comment_post’,$plugin_public,’add_custom_comment_page’);
function add_custom_comment_page() {
$comment_id = comment_ID();
add_comment_meta($comment_id, ‘id’, $id);
}
Read more here:: how can I send comment_id to a function of my plugin