I'd like to see a few more vars passed to this hook to make it more usable.
Add Email template type to the vars passed to this hook.
[co]
add_hook('EmailPreSend', 1, function ($vars)
{
if ($vars['type'] == 'service') {
return $extra_service_merge_fields
}
});
[/co]
Even better would be to pass all template vars available to this email template to this hook
[co]
add_hook('EmailPreSend', 1, function ($vars)
{
if ($vars['mergefields']['client_id'] == '1') {
return $special_client_stuff;
}
});
[/co]
Post the first comment
Login to post a comment.