Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter hnnhtabunan

    (@hnnhtabunan)

    Hey Julian,

    Thank you very much! My issue is resolved by adding the filter you suggested. ?? I appreciate your help!

    Many thanks,
    Hannah

    Thread Starter hnnhtabunan

    (@hnnhtabunan)

    Hi Julian,

    I’m sorry for the late reply. Still having the same issue.

    Where can I find the “Hide header” option?

    The email that triggers the problem is an email template created inside a custom plugin. As mentioned, the email has these lines of code in the email template:

    <!--[if gte mso 9]>

    <xml>

    <o:OfficeDocumentSettings>

    <o:AllowPNG/>

    <o:PixelsPerInch>96</o:PixelsPerInch>

    </o:OfficeDocumentSettings>

    </xml>

    <![endif]-->

    While this is the code for sending the email:

    public function sendThisEmail($token, $product) {
        $currentUserId = get_current_user_id();
        $user          = wp_get_current_user();
        $user_name     = $user->data->display_name;
        $email         = $user->data->user_email;
    
        $logo        = "logo/link";
        $subject     = "This is a subject" ;
        $headers     = array('Content-Type: text/html; charset=UTF-8');
    
        $message = MailHelper::prepareEmail(
            CUSTOM_PLUGIN . '/views/wp-html-mail/email-template',
            array(
                'logo' => $logo,
                'email' => $email,
                'user_name' => $user_name,
            )
        );
        wp_mail( $email, $subject, $message, $headers );
    }
    
    public static function prepareEmail( $template, $params = array() ) 
        {
            if ( !empty( $params ) && is_array( $params ) ) {
                extract( $params );
            }
    
            ob_start();
            require( $template );
            $result = ob_get_contents();
            ob_end_clean();
    
            return $result;
        }

    Many thanks,
    Hannah

    Thread Starter hnnhtabunan

    (@hnnhtabunan)

    Hello @juliangk, thanks for the quick reply.

    I am not using WPForms but here the plugins I am using that might have affected the email.

    • Contact Form 7
    • WooCommerce

    I’m also using the Divi theme.

    Many thanks,

    Hannah

Viewing 3 replies - 1 through 3 (of 3 total)