Created
November 6, 2022 20:18
-
-
Save yuriinalivaiko/5a83f93a673e0ef62ed35297df5b60c3 to your computer and use it in GitHub Desktop.
Hook um_email_template_path
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_template_path | |
* | |
* Type: filter | |
* | |
* Description: Change email template location. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/class-mail.php#L189 | |
* @link https://docs.ultimatemember.com/article/1116-umemailtemplatepath | |
* | |
* @package um\core | |
* @see um\core\Mail::get_email_template() | |
* @since 2.0 | |
* @version 3.0 The $args parameter is removed. | |
* | |
* @param string $template_path Template location. | |
* @param string $template Template key. | |
* @param array $args Template settings. | |
* | |
* @return string Template location. | |
*/ | |
function my_email_template_path( $template_path, $template, $args = array() ) { | |
// your code here. | |
return $template_path; | |
} | |
add_filter( 'um_email_template_path', 'my_email_template_path', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment