Deprecated: File Theme without header.php is deprecated since version 3.0.0 with no alternative available. Please include a header.php template in your theme. in /home/rolevine/public_html/wp-includes/functions.php on line 5579
Customizing the To address - rolevine Customizing the To address - rolevine

Categories

Customizing the To address

You are here:

[vc_row][vc_column][vc_column_text]

Issue

There is a need to make dynamic the To field of the Email Notification.

Use Case

When an entry is updated (in this case users can update other user's entries), the To address of the notification email needs to be the user who updated the entry.

Solution

Use a custom shortcode that gets the current user's email address.

Credits to

Wanlapa Tantiprasongchai (Formidable Slack @Wanlapa Tantiprasongchai) - for asking the question

Caveats

None

Code

[/vc_column_text][vc_raw_html]JTNDYmxvY2txdW90ZSUzRSUwQSUzQ3ByZSUzRSUwQWFkZF9zaG9ydGNvZGUlMjglRTIlODAlOTllbWFpbC1zaG9ydGNvZGUlRTIlODAlOTklMkMlMjAlRTIlODAlOThzZW5kX3RvX3VwZGF0ZXIlRTIlODAlOTklMjklM0IlMEFmdW5jdGlvbiUyMHNlbmRfdG9fdXBkYXRlciUyOCUyOSUyMCU3QiUwQSUyMCUyMCUyMCUyNHVzZXJfaW5mbyUyMCUzRCUyMGdldF91c2VyZGF0YSUyODElMjklM0IlMEElMjAlMjAlMjAlMjR1c2VyX2VtYWlsJTIwJTNEJTIwJTI0dXNlcl9pbmZvLSUzRXVzZXJfZW1haWwlM0IlMEElMjAlMjAlMjByZXR1cm4lMjAlMjR1c2VyX2VtYWlsJTNCJTBBJTdEJTBBJTNDJTJGcHJlJTNFJTBBJTNDJTJGYmxvY2txdW90ZSUzRQ==[/vc_raw_html][vc_column_text]and use [email-shortcode] for the value of the To field in the notification.[/vc_column_text][/vc_column][/vc_row]

Table of Contents

Deprecated: File Theme without footer.php is deprecated since version 3.0.0 with no alternative available. Please include a footer.php template in your theme. in /home/rolevine/public_html/wp-includes/functions.php on line 5579

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram