Viewing 4 replies - 1 through 4 (of 4 total)
  • You can exclude specific emails if you can identify it by subject, sender or content.

    function haet_exclude_from_template( $email ){
        $to = $email[0];
        $subject = $email[1];
        $message = $email[2];
    
        // do not use template if $subject = foo
        if( $subject == 'foo')
            return false;
        return true;
    }
    add_filter('haet_mail_use_template','haet_exclude_from_template');

    Thread Starter darkpollo

    (@darkpollo)

    I suppose I can do that, but it seems that your plugin overrrides the defaults on wordpress and do not follow the right procedure.
    Memberpress has an option to use the default template for emails or not, using your plugin, that option is ignored and your template is allways used.

    I have deactivated it.

    I just need a simple plugin to modify the reset password emails, the rest are handled by memberpress already.
    Yours seems too much for what I need.

    Thank you anyway!

    You can use it that way. Just use the filter above and only return true if you detect your password reset mail. In all other cases return false.

    Thread Starter darkpollo

    (@darkpollo)

    Hi,
    I am trying this and I cannot make it work at all.
    I am using this code:

    function haet_exclude_from_template( $email ){
        $to = $email[0];
        $subject = $email[1];
        $message = $email[2];
    if( $subject == '[BLOGNAME] Password Reset')
            return true;
        return false;
    }
    add_filter('haet_mail_use_template','haet_exclude_from_template');

    And it looks like the subject is never a match. I have tried other options but it seems something is not right.
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Excluding all plugins by default’ is closed to new replies.