WordPress.org

Ready to get started?Download WordPress

Forums

Notify comment author upon comment approval (1 post)

  1. naoshad
    Member
    Posted 3 years ago #

    Hi,

    I was trying to send a mail to the comment author when a pending/on hold/moderated comments get approved by the admin. But nothing happened for me.

    function notify_author($comment_ID, $status) {
      if($status=='approve'){
        //mail to author
      }
    add_action('wp_set_comment_status', 'notify_author', 10, 2 );

    But It didn't work for me. Anybody know with which hook I have to work with?

Topic Closed

This topic has been closed to new replies.

About this Topic