Support » Plugin: WP HTML Mail - Email Designer » Template applying when not required

Viewing 1 replies (of 1 total)
  • find anything all emails hav in common. It may be the sender, a word in the subject or something in the email body. Then add this function to your (child-)themes functions.php and customize it. Return TRUE if the template should be used and FALSE if not.

    
    // return true if you want to use a template for current mail
    // return false if you want to leave the content of this email unchanged
    add_filter( 'haet_mail_use_template', 'customize_template_usage', 10, 2 );
    function customize_template_usage( $use_template, $mail ){
        // $mail['to'] ...
        // $mail['subject'] ...
        // $mail['message'] ...
        // $mail['headers'] ...
        // $mail['attachments'] ...
        return true;
    }
    
Viewing 1 replies (of 1 total)
  • The topic ‘Template applying when not required’ is closed to new replies.