Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed. We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

include comment author in 'Notify of new replies'

3 Posts
2 Users
0 Reactions
1,811 Views
(@yassan)
Member Customer
Joined: 9 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: 10 years ago
Posts: 4233
 

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: 9 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