• Resolved pediwent

    (@pediwent)


    I know you don’t support this, but a similar plugin does this by detecting a code that the user adds to the message (like {{disable_template}}). The plugin then sees if that code is in the message and bypasses the custom template if found (and removes the code from the message).

    That was the simplest way I could find to accomplish this without the user having to know PHP and it should be pretty simple to implement.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter pediwent

    (@pediwent)

    In fact, I just added a few lines of code to the send_email function and this worked like a charm.

    if( str_contains( $args['message'], '{{disable_template}}' ) ){
      $args['message'] = str_replace( '{{disable_template}}', '', $args['message'] );
      return $args;
    }

    Your plugin is the easiest and most reliable to use of all the email templating plugins I researched, but I needed this function. I’d love it if you would add it to the core plugin.

    M Haseeb

    (@haseeb0001)

    Hi @pediwent

    I hope you are doing well.

    Thanks for your suggestion, I have shared it with my team and we will try to add this feature in our future release.

    Thanks

    @pediwent where exactly did you place that code?

    If I understand correctly, you placed {{disable_template}} in the body of the email?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable for certain emails’ is closed to new replies.