-
AuthorPosts
-
October 31, 2016 at 10:11 am #706054
Hi Team,
I use German Market for WooCommerce. This Plugin use the content of impress, Terms of Service etc. for the sending e-mails. The Problem is, that all your Advanted Editor Tags come with this content like text. Is there an opportunity to filter them out? For Example I found the same problem for Visual Composer: https://froststudios.de/entfernen-der-visual-composer-tags-in-emails-fuer-german-market-woocommerce/
October 31, 2016 at 5:14 pm #706316Hi Mike61!
I checked the code sample for visual composer and I think it can be used with our Enfold theme if we modify it a bit. Please try to add this code at the ver bottom of the Enfold child theme functions.php file:
function removeAVIATags(){ $regex = "^\[(\/|)av_(.*)\]^"; $imprint_page_id = get_option( WGM_Helper::get_wgm_option( 'impressum' ) ); $imprint_page = get_post( $imprint_page_id ); $imprint_text = $imprint_page->post_content; $imprint_text = preg_replace($regex,"",$imprint_text); WGM_Email::the_mail_footer_section( __( 'Legal Information', 'woocommerce-german-market' ), $imprint_text ); $terms_page_id = get_option( WGM_Helper::get_wgm_option( 'versandkosten__lieferung' ) ); $terms_page = get_post( $terms_page_id ); $terms_page->post_content = preg_replace($regex,"",$terms_page->post_content); WGM_Email::the_mail_footer_sub_section( sprintf( __( 'Shipping %s Delivery', 'woocommerce-german-market' ), '&'), $terms_page->post_content ); $withdrawal_page_id = get_option( WGM_Helper::get_wgm_option( 'widerruf' ) ); $withdrawal_page = get_post( $withdrawal_page_id ); $withdrawal_page->post_content = preg_replace($regex,"", $withdrawal_page->post_content); WGM_Email::the_mail_footer_section( __( 'Revocation', 'woocommerce-german-market' ), $withdrawal_page->post_content ); $terms_page_id = get_option( WGM_Helper::get_wgm_option( 'agb' ) ); $terms_page = get_post( $terms_page_id ); $terms_page->post_content = preg_replace($regex,"",$terms_page->post_content); WGM_Email::the_mail_footer_section( __( 'Terms and Conditions', 'woocommerce-german-market' ), $terms_page->post_content ); } add_filter('get_email_de_footer','removeAVIATags');
Please note that I didn’t test the code extensively – thus I’d recommend to check the email content carefully.
Cheers!
PeterOctober 31, 2016 at 5:38 pm #706345Hi Peter,
thank you, I will test this solution.
Cheers
MikeNovember 1, 2016 at 7:55 am #706586 -
AuthorPosts
- You must be logged in to reply to this topic.