Support » Plugin: WordPress Email Template Designer - WP HTML Mail » Prevent Woocommerce From Using Template

  • Resolved Joseph

    (@josephapeke)


    Hello, thanks for this awesome plugin. My goal is to create templates for all my emails excerpt woocommerce. I want to leave the woocommerce default templates untouched. I don’t want this plugin to modify woocommerce email templates in any way. Please is there a way to achieve this? The current template I have created in the free version is currently being applied to all woocommerce emails and makes them look really ugly. So now woocommerce emails have two headers and two footers; the ones generated by the this plugin and the default woocommerce ones. Thank you

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor codemiq

    (@codemiq)

    Hey @josephapeke
    Thanks for the positive feedback. You may have recognized our WooCommerce Email Customizer extension but it you really want your WooCommerce emails untouched you can use the same way we posted one thread below for another plugin: https://wordpress.org/support/topic/wrap-around-a-wrap/

    1. Identify anything all WooCommerce emails have in common
    2. Customize the filter to exclude them
    Thread Starter Joseph

    (@josephapeke)

    Hello @codemiq
    Thanks for the reply. Yes I did realize the woocommerce extension and other nice extensions as well. I’ll probably use some in future projects but for now I want to leave woocommerce emails untouched. Sorry I should have read the FAQ section before submitting my question. The guide works fine. I was able to achieve my goal with the function below;

    // Prevent WordPress Email Template Designer - WP HTML Mail plugin from styling Woocommerce emails
    add_filter( 'haet_mail_use_template', 'customize_template_usage', 10, 2 );
    function customize_template_usage( $use_template, $mail ){
        if( strpos($mail['message'], '(Billing)') )
            return false;
    }

    I used Billing as the common word. Thanks for the great support.

    Hola Joe_PK, fue de gran ayuda tu nueva solución.
    Gracias por compartir.

    Thread Starter Joseph

    (@josephapeke)

    You are welcome @brio2020

    Estimado Joe_PK, la solución que publicaste funciona perfecto con Woocommerce, se logra evitar que no se monte la plantilla WP HTML MAIL, pero me sucede que también deshabilita la gráfica del WP HTML MAIl diseñado. Quería saber si te sucedio lo mismo con tu plantilla y como lo solucionaste.
    Saludos
    Brio

    Thread Starter Joseph

    (@josephapeke)

    Hello @brio2020
    Yes I experienced the same problem while testing on a local installation of WordPress. But on a live website, the template worked perfectly and was able to display all the graphics in emails. So I didn’t do anything to solve it. It just worked once I moved to a live website.

    Thread Starter Joseph

    (@josephapeke)

    Hello @brio2020
    Sorry for my misleading solution. I just noticed the problem you were talking about. The code to prevent the plugin from styling woocommerce emails also reverts all other emails back to plain text. I feel so dumb for not realizing this sooner. I’m not sure how to solve the problem. I guess we have to draw the attention of the developers to the situation. But if you’ve found a solution then please do share…I could really use the help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Prevent Woocommerce From Using Template’ is closed to new replies.