• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

RESOLVED How to use snippets within the newsletter plugin

jetrca

New member
Messages
2
Likes
0
Points
1
#1
Dear All,
Is there a way to include snippets into newsletters composed with „the“ Newsletter Plugin (https://www.thenewsletterplugin.com)?
If I enter something like [wbcr_html_snippet id="3066"] into the newsletter text, it is not handled like a tag but reproduced as is.
Thank you in advance for your help.
Yours, Jetrca
 

Temyk

Support team
Staff member
Messages
125
Likes
10
Points
18
#2
Hi,

I looked up the Newsletter Plugin. Indeed, it does not process shortcodes in the text of the letter.
Please contact the support of Newsletter Plugin.

If you have any questions or comments, please let me know and I'll be more than glad to assist you.
 

Temyk

Support team
Staff member
Messages
125
Likes
10
Points
18
#3
You can create a PHP snippet with this code and include it everywhere.
PHP:
add_filter('newsletter_message_html', 'newsletter_doshortcode', 10, 3);
function newsletter_doshortcode($content, $email, $user){
    return do_shortcode($content);
}
After that, any shortcodes will be triggered in the Newsletter plugin.
 

jetrca

New member
Messages
2
Likes
0
Points
1
#4
Thank you, that solved my problem(y) – although I first had to find out, that the expansion does not happen until the E-Mail is actually sent. In the preview, you still see the code.

Btw: It is against my intuition, that the black play icon means paused; feel free to start and that the green pause icon means runs; feel free to pause. But: Wer schimpft, der kauft :giggle: