Forums

[resolved] [Plugin: Notify on comment] Subject is Please Moderate when no moderation is required (2 posts)

  1. jean01
    Member
    Posted 6 months ago #

    The subject of the email sent is Please moderate . . . even when no moderation is required.
    I would like the author to be sent an email ONLY when the comment required moderation.
    However, I would be OK if the subject distinguished between messages requiring moderation and those not requiring moderation.

    Glad that the plug in works with 2.7.1 as the other similar plug ins do not.

    Thanks

    http://wordpress.org/extend/plugins/notify-on-comment/

  2. jean01
    Member
    Posted 6 months ago #

    Figured out how to make it send emails only when moderation is required:

    Find the statement:
    @wp_mail($to, $subject, $notify_message, $headers);
    and surround it with the variable checks required to determine that moderation_notify is on and that the comment has not been approved, as in the following:

    //Modify to only send if moderation is required
    $modereation_required = get_option('moderation_notify');
    $approved = $comment->comment_approved ;
    if($modereation_required AND $approved != 1){
    @wp_mail($to, $subject, $notify_message, $headers);
    }
    return true;

Reply

You must log in to post.

About this Topic