• Resolved tezalsec

    (@tezalsec)


    Hi, I just want to say, I really appreciate your plugin, but the only reason I use another, is the lack of php support. This would be as simple as to allow the custom template file “template.html” to be saved as “template.php”. This would allow me to insert last minute conditional text values for emails.

    Any chance of supporting that?

    Thanks.

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

    (@juliangk)

    Hello @tezalsec,

    could you explain in more detail what exactly you are trying to accomplish?

    Best regards
    Julian

    Thread Starter tezalsec

    (@tezalsec)

    Just to have the freedom to be able to place conditional texts or use functions to retrieve texts from the database instead of hardcoding them, like in the header and footer. Woocommerce email templating also has this. And also, as a last resort place to differentiate between different types of email receivers, showing them individualized texts, when other plugins have unsufficient email templating options themselves.

    • This reply was modified 6 months ago by tezalsec.
    • This reply was modified 6 months ago by tezalsec.
    Plugin Support Julian

    (@juliangk)

    Hello @tezalsec,

    What about using filters?
    If you use the wp_mail filter with a priority lower than 12 you can modify the mail content before our plugin does its work.

    e.g. add_filter(‘wp_mail’, ‘your_function’, 11, 1);

    If you want to modify it afterwards use a higher priority
    e.g. add_filter(‘wp_mail’, ‘your_function’, 13, 1);

    Best regards
    Julian

    Thread Starter tezalsec

    (@tezalsec)

    Hi,

    yes, I realize I can use that, but it is a pain beyond a few simple variable changes, because the $body is set by then, you will have to parse it and replace it, and often import global variables into the function to make conditional values available to then make “if then” statements and echo different results.

    It is way easier, clearer, more readible and more flexible to be able to do last-minute changes to the template file, outside of the wp_mail function, especially when there are also conditional html layout changes.

    Thanks.

    • This reply was modified 5 months ago by tezalsec.
    Plugin Support Julian

    (@juliangk)

    Hello @tezalsec,

    currently the only option you have is using these filters.
    We might rework the plugin as we will revise it in the near future, but I cannot make any promises on what you mentioned specifically.

    If you have any other issues, let us know.

    Best regards
    Julian

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.