Subscriber mail template includes short codes from WP Bakery Visual Composer

I'm using the very popular Visual Composer page builder (WP Bakery) on a couple of sites including this one.

The Subscriptions plug in sends emails including shortcodes e.g. :-

[vc_row][vc_column width=”1/1?][vc_column_text]As at end of April 2015 the AGM Dinner at Shrewsbury on June 20th 2015 has approx. 100 attendees. There is still plenty of Read more…

Is there a solution to this?

Thanks,

Ken

  • keneastwood
    • Design Lord, Child of Thor

    Hi @Jude,

    There's nothing wrong with the subscriber form on the site - it's the mail template sent to subscribers when new posts are added.

    I included an example in my first message. This text, "[vc_row][vc_column width=”1/1?][vc_column_text]" appears in each mailing in front of the post text.

    These are short codes from WP Bakery Visual Composer. They are not visible in posts on the site but appear in the mail sent by the Subscriptions plugin.

    The site is at http://basclub.org but it is a membership site and the news page and blog posts are member protected. I can always grant you access through WPMUDev dashboard if required.

    Look forward to hearing from you.

    Ken

  • Jude
    • DEV MAN

    Hi there @keneastwood

    This does not happen with most plugins .. I was going through the code and can see the SBE has this scenario covered by running through the do_shortcode function call on the content as you can see here.

    Line 65 at mail-template.php

    add_filter( 'the_content', 'do_shortcode', 11 );

    Visual Bakery however uses a hook very late to process their shortcode which overrides the default SBE behaviour.

    You have 2 options at this point.

    1) Use the excerpt instead. (Reccomended)
    2) Comment out a line of code in the plugin (NOT Reccomended)

    Anyhoo for your reference the line to comment out would be

    remove_all_filters( 'the_content' );

    From this file on line 58.

    /wp-content/plugins/subscribe-by-email/inc/mail-templates/mail-template.php:

    Let me know if you need further inputs here

    Cheers,
    Jude

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.