Home Forums Plugins WooCommerce Email Template Customizer E-mail in the default template sends only content without defined blocks

E-mail in the default template sends only content without defined blocks

  • Author
    Posts
  • #154940

    A P
    Participant

    Hi!

    I have a defined function in functions.php that sends a notification to an e-mail after a custom type is updated (I’m sending a preview below). I set a default template within your plugin, where in addition to the “content” element, I also added a “block” for the header and for the footer – these are blocks that I defined so that I don’t have to create them anew in every e-mail. In all e-mail notifications for WooCommerce they work, unfortunately, after testing through this PHP code, no block is displayed in the e-mail, only content.

    Where could be the problem?

    Thanks!

    Btw: I have purchased premium through Envato (I did not find the field to enter the product code for verification).

    
    $mailer = WC()->mailer();
    $wrapped_message = $mailer->wrap_message($heading, $message);
    $wc_email = new WC_Email;
    $html_message = $wc_email->style_inline($wrapped_message);
    wp_mail($to, $subject, $html_message, $headers );
    

You must be logged in to see replies to this topic. Click here to login or register