Add ability to filter the html being sent to email campaigns
-
Hi,
We use your plugin to send email campaigns, and have noticed in the most recent version that the post content sent to Benchmark from the plugin no longer has any filters applied to it or any means of hooking in to the process to allow us to add / manipulate the html sent to Benchmark. This means we can’t include content from custom fields and related posts etc. Therefore we would have to include all the HTML every time in the post being sent, rather than do any kind of templating.I think this could be easily resolved by providing a filter in the create_email function of the class.api.php file, after you get the post, and before running through the sprintf function.
So after these to lines of code there;
// Tweak Template
$post = get_post( $post_id );you could add something like;
$post_html = apply_filters( ‘benchmark_email_campaign_body_html’, $post );And then change the sprintf that follows to use this variable instead of the ‘$post->post_content’ variable, and then developers could hook in at that point, manipulate the html and return it before sending on to Benchmark.
This would make it easy for us to then send emails from posts using your system but style them as we want. Would that be possible please?
Thanks for your help in advance.
- The topic ‘Add ability to filter the html being sent to email campaigns’ is closed to new replies.