Notifications
Clear all

Adding WP Username to Comment Reply Notification Email

3 Posts
2 Users
0 Reactions
1,039 Views
(@judgeholden)
New Member
Joined: 7 years ago
Posts: 2
Topic starter  

Hi there,
I just started using and love your plugin’s functions, but had one small question. I want to edit the comment reply notification emails slightly, just to make them more engaging for the reader.
The main thing I’m trying to accomplish is putting the first and last name of the user at the top of the email. I know it's in the email helper, and tried:

$username = wp_get_current_user();
 $message .= "Hi $username";

as well as $currentUser, and a couple other options, but the wp_get_current_user() function doesn’t seem to work here. I am a novice in WordPress and PHP in general, so excuse me for butchering your elegant code, but I was just wondering if you had a quick suggestion or snippet as to how to have a personalized greeting per user at the beginning of each email.
Thanks!
Ian


   
Quote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6149
 

Thank You judgeholden,

wpDiscuz uses static phrases on mail generation, so there is no way to add variables in it yet.

However we'll take this under consideration and add it in future releases.


   
ReplyQuote
(@judgeholden)
New Member
Joined: 7 years ago
Posts: 2
Topic starter  

Alright, thank you. I was hoping there was already a predefined variable in the Email Helper PHP that I could just echo in the $message area of each email, but if that's not possible, I understand.

Thanks!


   
ReplyQuote
Share:
Scroll to top