Notifications
Clear all

include comment author in 'Notify of new replies'

3 Posts
2 Users
0 Likes
1,534 Views
(@yassan)
Member Customer
Joined: 7 years ago
Posts: 6
Topic starter  

I want to include comment author in 'Notify of new replies'. 

Anyone could achieve it by customize PHP code?


   
Quote
 Tom
(@tomson)
Famed Member Admin
Joined: 9 years ago
Posts: 4171
 

I'm sorry but this is not an easy task. You should find some developer for this custom PHP code.


   
ReplyQuote
(@yassan)
Member Customer
Joined: 7 years ago
Posts: 6
Topic starter  

It could be customized without help.

    /**
     * notify on comment new replies
     */
    public function notifyCommentSubscribers($parent_comment_id, $new_comment_id, $email, $postId) {
        $emails_array = $this->dbManager->getNewReplyNotification($parent_comment_id, $email);
        $subject = ($this->optionsSerialized->phrases['wc_new_reply_email_subject']) ? $this->optionsSerialized->phrases['wc_new_reply_email_subject'] . ': "' . get_post( $postId )->post_title . '"' : __('New Reply', 'wpdiscuz');
        $message = ($this->optionsSerialized->phrases['wc_new_reply_email_message']) ? get_user_by('email', $email)->display_name . $this->optionsSerialized->phrases['wc_new_reply_email_message'] : __('New reply on the discussion section you\'ve been interested in', 'wpdiscuz');
        foreach ($emails_array as $e_row) {
            $this->emailSender($e_row, $new_comment_id, $subject, $message);
        }
    }

   
ReplyQuote
Share:
Scroll to top