Title: wp_insert_comment issue
Last modified: August 19, 2016

---

# wp_insert_comment issue

 *  [pms47](https://wordpress.org/support/users/pms47/)
 * (@pms47)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/wp_insert_comment-issue/)
 * I’m having some issues with using the wp_insert_comment function. On its own 
   it works just fine to insert new comments for a specific post.
 * However when I use get_comments() before wp_insert_comment() to check for duplicate
   comments the new comment is not inserted. Strangely it works if I refresh the
   page to try insert the comment again.
 * Any suggestions why this might happen.

The topic ‘wp_insert_comment issue’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [pms47](https://wordpress.org/support/users/pms47/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/wp_insert_comment-issue/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
