Created
January 9, 2017 10:31
-
-
Save ashleyfae/f4bb13c959a7c2483f434e5cae975ac6 to your computer and use it in GitHub Desktop.
Edit the contents of the admin expired email notice.
This file contains hidden or 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 | |
/** | |
* Append text to admin expired email. | |
* Also convert template tags. | |
* | |
* @param string $admin_message Default admin message contents. | |
* @param int $user_id ID number of the expired user. | |
* | |
* @return string New admin message contents. | |
*/ | |
function ag_rcp_before_admin_email_expired_thanks( $admin_message, $user_id ) { | |
$user_info = get_userdata( $user_id ); | |
// Append new text. | |
$admin_message .= __( 'Subscription Name: %subscription_name%', 'rcp' ) . "\n\n"; | |
// Convert email tags. | |
return rcp_filter_email_tags( $admin_message, $user_id, $user_info->display_name ); | |
} | |
add_filter( 'rcp_before_admin_email_expired_thanks', 'ag_rcp_before_admin_email_expired_thanks', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment