Last active
October 26, 2020 15:14
-
-
Save plugin-republic/649c969b6255f3b2cc9fa7ac58345642 to your computer and use it in GitHub Desktop.
Filter the content of the user approval and rejection messages
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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment