Created
November 6, 2022 19:44
-
-
Save yuriinalivaiko/7676e4d57a7f153505a5144f191d5061 to your computer and use it in GitHub Desktop.
Hook um_email_send_subject
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 | |
/** | |
* Hook: um_email_send_subject | |
* | |
* Type: filter | |
* | |
* Description: Change email notification subject. | |
* Used in the core to translate email subject. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/class-mail.php#L439 | |
* @link https://docs.ultimatemember.com/article/1113-umemailsendsubject | |
* | |
* @package um\core | |
* @see um\core\Mail::send() | |
* @since 2.0 | |
* @version 3.0 | |
* | |
* @param string $subject Email subject. | |
* @param string $template Template key. | |
* | |
* @return string Email subject. | |
*/ | |
function my_email_send_subject( $subject, $template ) { | |
// your code here. | |
return $subject; | |
} | |
add_filter( 'um_email_send_subject', 'my_email_send_subject', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment