Skip to content

Instantly share code, notes, and snippets.

@max-kk
max-kk / extra_mail_args.php
Last active May 27, 2023 07:11
LRM :: extra_mail_args
<?php
// User Emails
add_filter("lrm/mails/registration/body", function($mail_body, $user_login, $userdata, $user) {
// Let's replace the {{USER_PHONE}} tag with user meta value
$mail_body = str_replace( '{{USER_PHONE}}', get_user_meta($user->ID, 'phone', true), $mail_body );
return $mail_body;
}, 10, 4);