AI Assistant
Notifications
Clear all

Adding WP Username to Comment Reply Notification Email

3 Posts
2 Users
0 Reactions
1,467 Views
(@judgeholden)
New Member
Joined: 8 years ago
Posts: 2
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#1982]

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: 8 years ago
Posts: 6645
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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: 8 years ago
Posts: 2
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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