Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the gVectors community!

Merry Christmas and Happy Holidays! 🎄

include comment author in 'Notify of new replies'

3 Posts
2 Users
0 Reactions
1,917 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: 11 years ago
Posts: 4234
 

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