Limited Support
Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.
Hello. I am wondering if we could create our custom shortcode and use it for the email body?
Example. I have a shortcode [email_footer_logo] with a function to return a png file. Something like this. (I am planning a add a option for ACF option page. So the site manage can edit it from option page.
return '<p style="text-align: left;"><img src="https://example.com/wp-content/uploads/2022/11/vs-email-footer-logos.png" style="max-width: 520px; width: 100%; height: auto";/></p>';
}
However. When I placed it into the email body. It does not return anything.
Plus. I like to use TranslatePress Shortcode for translating email body, I use this way with Woocommerce Email and it works. Their shortcodes are ike:
[trp_language language="en_HK"]
Content here will be only for en_HK visitor
[/trp_language]
[trp_language language="zh_HK"]
Content here will be only for zh_HK visitor
[/trp_language]
These shortcode wraps do not work either...
Any workaround we can add support to this?
Thanks
Yes it is WordPress Shortcodes I guess?
The shortcodes are added via add_shortcode()
FYI
add_shortcode( 'email_footer_logo', 'email_footer_logo');
function email_footer_logo() {
return '<p style="text-align: left;"><img src="https://example.com/wp-content/uploads/2022/11/vs-email-footer-logos.png" style="max-width: 520px; width: 100%; height: auto";/></p>';
}
Thanks
Thanks! That is fast, will test it later today!