At least for removing the “Pending moderation” email that users get, I believe you should be able to remove that with the following code in your theme’s functions.php or similar.
remove_action( 'bp_core_activated_user', 'bp_registration_options_notify_pending_user', 10, 3 );
Regarding getting a display name in place, you could do something like this:
function bpro_support_add_display_name( $message, $login, $email ) {
$user = get_user_by( 'email', $email );
$name = bp_core_get_user_displayname( $user->ID );
return str_replace( '[display_name]', $name, $message );
}
add_filter( 'bprwg_new_member_request_admin_email_message', , 10, 3 );
This would add your own custom shortcode that you could filter out and replace with. You would then need to add [display_name] inside the saved message setting so that it can be properly placed where you want it in the wording.
Great, thanks for the custom shortcode code!
I’m not so worried about the pending moderation email, it’s mostly the Membership Denied email. I would prefer to send that myself (not auto). At the very least I need to change the subject line.
If you’re just needing, at minimum, to change the denied subject line, we could use this filter:
$subject = __( 'Membership Denied', 'bp-registration-options' );
...
$mailme = [
'user_email' => $user->data->user_email,
'user_subject' => $subject,
'user_message' => $message,
];
/**
* Filters the email arguments before mailing.
*
* @since 4.2.0
*
* @param array $emailme Array of email arguments for wp_mail.
* @param object $user User object for user being moderated.
*/
$mailme_filtered = apply_filters( 'bpro_hook_before_email', $mailme, $user );
I can type up a quick function like i did earlier if needed.