Skip to content

Instantly share code, notes, and snippets.

@yuriinalivaiko
Created November 6, 2022 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuriinalivaiko/7676e4d57a7f153505a5144f191d5061 to your computer and use it in GitHub Desktop.
Save yuriinalivaiko/7676e4d57a7f153505a5144f191d5061 to your computer and use it in GitHub Desktop.
Hook um_email_send_subject
<?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