Documentation

Adding shortcodes to emails

While we do not support WordPress shortcodes out-of-the box in ShopMagic, you can add this filter to your functions.php in your theme to enable shortcodes in email content:
add_filter( 'shopmagic/core/action/sendmail/raw_message', 'do_shortcode' );
This filter was added in ShopMagic 2.2, so it won't work in previous versions.
We do not support shortcodes by default, because we found the markup output by shortcodes was generally not intended for use in HTML emails, and could break the display of the email.
That said, if you know the shortcode content is email safe, it is possible to enable shortcode evaluation in emails with the snippet above. That will apply the do_shortcode() function to email content to expand shortcodes.
It works in all email actions:

  • Send Email
  • Send Email - Raw HTML
  • Send Email - Plain Text
Not the solution you are looking for?

Please check other articles or open a support ticket.

Cookies preferences

Others

Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.

Necessary

Necessary
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.

Advertisement

Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.

Analytics

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.

Functional

Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.

Performance

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.