Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I use a different theme named Team Talk (Premium). Since I use this theme, I don't receive the new comment notification by email. I don't know where to look at but I found this in my new theme :

function get_content_html_for_comment($comment){
    $comment_html  = "";
    // Get the comment data
    //switch on the output buffer
    ob_start();
    // Allow the email to the author to be sent
    wp_notify_postauthor($comment_ID, $comment->comment_type);
    $max_depth = get_option('thread_comments_depth');
    $args = array ('max_depth' => $max_depth);
    //render the content to the output buffer
    //call _ht_comment 
    echo _ht_comment($comment, $args, $this->calculate_comment_depth($comment));
    //the content will now be in the buffer, so get that
    $comment_html = ob_get_contents();
    //restore buffer
    ob_end_clean();
    return $comment_html;

So, it seems to allow to receive notification but it doesn't work.

share|improve this question
    
Have you contacted the theme author? –  Andrew Bartel Dec 17 '13 at 18:37
add comment

1 Answer 1

up vote 0 down vote accepted

I do not see the $comment_ID variable having any value in your code. So try by changing the following code

wp_notify_postauthor($comment_ID, $comment->comment_type);

to

wp_notify_postauthor($comment->comment_ID, $comment->comment_type);

You can also remove $comment->comment_type as per codex

share|improve this answer
    
You are my hero –  Noob Dec 17 '13 at 19:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.