Shortcodes in mail text are not executed
-
A shortcode like [table id=1 /] (from the TablePress plugin) in a text or HTML block of the composer is not replaced with its output. Not on editing (okay, that’s not what I need), but also not on the mail to test subscribers, an not when finally sending to the normal subscribers.
The shortcode option is activated (set to “yes”).
I also tried the hook newsletter_replace or newsletter_message_html in the functions.php with a custom internal shortcode without success:
add_filter("newsletter_replace", "cy_filter_newsletter_tablepress", 10, 3); function cy_filter_newsletter_tablepress($html, $email, $user) { return preg_replace('/\{table_([^\s\}]+)\}/', do_shortcode('[table id="\1" /]'), $html); }
Using that code with {table_1} in a text or HTML block results in the correct shortcode [table id=”1″ /], but does not execute the shortcode itself.
Do I misunderstand the functionality of shortcodes in mails, or is it a bug, or a PRO feature?
- The topic ‘Shortcodes in mail text are not executed’ is closed to new replies.