Title: Plugin API comment_post /  Comment ID?
Last modified: August 19, 2016

---

# Plugin API comment_post / Comment ID?

 *  [Allan Collins](https://wordpress.org/support/users/collinsinternet/)
 * (@collinsinternet)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/plugin-api-comment_post-comment-id/)
 * How can I get the comment ID of a new comment that is just saved into the database?

Viewing 1 replies (of 1 total)

 *  Thread Starter [Allan Collins](https://wordpress.org/support/users/collinsinternet/)
 * (@collinsinternet)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/plugin-api-comment_post-comment-id/#post-805399)
 * Nevermind, I figured it out. You must pull the comment ID into your function.
   So
 * function myaction_save($comment_ID) {
 * //function stuff using $comment_ID
 * }

Viewing 1 replies (of 1 total)

The topic ‘Plugin API comment_post / Comment ID?’ is closed to new replies.

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [comment_post](https://wordpress.org/support/topic-tag/comment_post/)
 * [plugin api](https://wordpress.org/support/topic-tag/plugin-api/)

 * 1 reply
 * 1 participant
 * Last reply from: [Allan Collins](https://wordpress.org/support/users/collinsinternet/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/plugin-api-comment_post-comment-id/#post-805399)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
