isTemplateValid() should check slugs too
-
Hi there,
After switching from wpMandrill to send-emails-with-mandrill, we encountered problems where sent emails wouldn’t use the right template. We traced it back to the function isTemplateValid() in lib/wpMandrill.class.php. The function, which is called by wpMandrill::mail() before making a request, only checks the $template parameter against the template name, not against the unique template slug. The wpMandrill plugin checks against both, and I believe Mandrill prefers unique slugs to names at this point. I would recommend changing line 586 in lib/wpMandrill.class.php from
if ( $curtemplate['name'] == $template ) {
to
if ( $curtemplate['name'] == $template || $curtemplate['slug'] == $template) {
Thanks,
Ilan
- The topic ‘isTemplateValid() should check slugs too’ is closed to new replies.