Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Julian

    (@juliangk)

    Hello Jim,

    could you explain in more detail what you are trying to accomplish? The plugin does not change content, it only applies styling. To change the content, you have to change whatever is triggering the e-mails.

    Best regards
    Julian

    Thread Starter Jim

    (@jwmc)

    I want to edit the content of an email sent by a plugin. Earlier I was using a different email template plugin; they had a filter “mailtpl/email_content” that I could use to access the content before it went out, and search and replace text in a custom function attached to the filter. I was hoping you had something similar.

    Hey Jim,
    WordPress has this filter on its own. Use the filter wp_mail to customize the content or anything else.
    You can do your changes before our plugin applies the template using a filter priority less than 12 e.g.
    add_filter( 'wp_mail','your_function',10,1);
    or you can do it afterwards using a priority greater than 12
    add_filter( 'wp_mail','your_function',20,1);

    wp_mail documentation

    Thread Starter Jim

    (@jwmc)

    Excellent! I’m still like a beginner, so really appreciate the excellent info, especially the tip about priority. When filtering before the template is applied, it didn’t work, I guess because I’m filtering html stuff in part. Filtering after worked perfectly.

    Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Filter for email content?’ is closed to new replies.