You can filter the email messages sent when a user is approved or rejected using the following snippet:
This file contains 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 | |
/** | |
* Filter the content of the user approval message | |
* @param $message The message content | |
* @param $url The url to redirect the user to | |
* @param $user The user object | |
*/ | |
function prefix_user_approval_message( $message, $url, $user ) { | |
$message = 'My new message goes here'; | |
return $message; | |
} | |
add_filter( 'wcmo_user_approval_message', 'prefix_user_approval_message', 10, 3 ); | |
/** | |
* Filter the content of the user rejection message | |
* @param $message The message content | |
* @param $url The url to redirect the user to | |
* @param $user The user object | |
*/ | |
function prefix_user_rejection_message( $message, $url, $user ) { | |
$message = 'My new message goes here'; | |
return $message; | |
} | |
add_filter( 'wcmo_user_rejection_message', 'prefix_user_rejection_message', 10, 3 ); | |
/** | |
* Filter the subject | |
* @param $subject The subject | |
*/ | |
function prefix_user_approval_rejection_subject( $subject ) { | |
$subject = 'My new subject goes here'; | |
return $subject; | |
} | |
add_filter( 'wcmo_user_approval_rejection_subject', 'prefix_user_approval_rejection_subject' ); |
Here’s how to add a snippet.