Skip to content

Instantly share code, notes, and snippets.

@yuriinalivaiko
Created November 6, 2022 20:18
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/5a83f93a673e0ef62ed35297df5b60c3 to your computer and use it in GitHub Desktop.
Save yuriinalivaiko/5a83f93a673e0ef62ed35297df5b60c3 to your computer and use it in GitHub Desktop.
Hook um_email_template_path
<?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