mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-02 12:02:25 +08:00
https://docs.ultimatemember.com/article/1778-receive-email-notification-when-user-updates-their-form
21 lines
477 B
Text
21 lines
477 B
Text
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);
|