Created
September 15, 2022 13:46
-
-
Save AngeliMae/6291b3b98bfc31b13656212eb10d30d9 to your computer and use it in GitHub Desktop.
Receive email notification when user updates their form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'um_after_user_updated',function( $user_id, $args, $to_update ){ | |
| ob_start(); | |
| ?> | |
| <table> | |
| <tbody> | |
| <?php foreach( $to_update as $metakey => $metavalue ): ?> | |
| <tr> | |
| <th><?php echo $metakey; ?>:</th> | |
| <td><?php echo $metavalue; ?></td> | |
| </tr> | |
| <?php endforeach; ?> | |
| </tbody> | |
| </table> | |
| <?php | |
| $contents = ob_get_contents(); | |
| ob_end_clean(); | |
| $admin_email = UM()->options()->get( ‘admin_email’ ); | |
| wp_mail( $admin_email,'Profile updated', $contents ); | |
| },9,3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment