Adding WP Username to Comment Reply Notification Email  

  RSS

judgeholden
(@judgeholden)
New Member
Joined: 10 months ago
Posts: 2
12/02/2018 6:29 pm  

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


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 1 year ago
Posts: 1511
12/02/2018 10:55 pm  

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
(@judgeholden)
New Member
Joined: 10 months ago
Posts: 2
13/02/2018 9:04 pm  

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: