I've checked many threads on the platform. But there is no thread which explains how to use the conditional $email>id
parameter straight into a template.
This is what I have in email-header.php
:
<div style="width:600px;" id="template_header_image">
<?php
if ( $img = get_option( 'woocommerce_email_header_image' ) ) {
echo '<p style="margin-top:0;"><img width="80%" height="auto" src="' . esc_url( $img ) . '" alt="' . get_bloginfo( 'name', 'display' ) . '" /></p>';
}
if( $email->id == 'customer_processing_order' ) {
echo '<img alt="order in processing" src="https/example.com/image.png" />';
}
?>
</div>
The src is an example. The if( $email->id == 'customer_processing_order' )
is not working.
It seems that parameter $email
is not being picked up. I tried to call it with global $email
; but this also does not work.
Any advice?