• Resolved sintacs

    (@sintacs)


    Hello,

    I want to send notification when a new comment is published to in a custom posttype post.

    One notification goes to the administrator but not if he posted the comment himself and one should go to the post author, but not if he posted the comment himself.

    Is there a hook or action I could use for this?

    I want to check if the current user is the recipient for the notification.

    Thanks you!

    Greetings
    Dirk

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kuba Mikita

    (@kubitomakita)

    Hi Dirk,

    looks like you’ll need two separate notifications, with one recipient each: admin and comment author.

    Then, with Notification : Conditionals you’ll be able to control when they get sent.

    Example:

    Process this trigger only if:
    {comment_author_user_email} is not equal to {post_author_user_email}
    Thread Starter sintacs

    (@sintacs)

    Hi Kuba,

    thank you for your reply.

    I see there is no action / filter, ok.
    One must make some money! All good.

    Greetings
    Dirk

    Plugin Author Kuba Mikita

    (@kubitomakita)

    Oh, there is! If you’re comfortable hooking into the code you can filter the recipients or control the notification on your own.

    The Conditionals extension is using notification/should_send filter, but there are plenty more 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Notification on publish comment, but not to user who posted it’ is closed to new replies.