Hey,
I've run into a situation where I would like to be able to use wordpress shortcode in the email template (subject and body). I've made a quick change in my copy of the plugin, but thought others might like this as well. I've included the patch below. I'm not sure if there's a better place to do the shortcode, but this seemed logical to me.
Edit: I just realized this might not be the right place to submit this since it's a "support" forum, but I'm not really sure where this would belong.
Index: includes/classes.php
===================================================================
--- includes/classes.php (revision 684892)
+++ includes/classes.php (working copy)
@@ -546,6 +546,9 @@
if ( $additional_headers )
$headers .= $additional_headers . "\n";
+ $subject = do_shortcode( $subject);
+ $body = do_shortcode( $body );
+
if ( $send )
return @wp_mail( $recipient, $subject, $body, $headers, $attachments );
@@ -851,4 +854,4 @@
return implode( ' ', $classes );
}
-?>
\ No newline at end of file
+?>