Update class-wc-emails.php
Check for a value against each meta item before outputting.
This commit is contained in:
parent
e4a959e397
commit
ede8bc1a2a
|
@ -300,13 +300,19 @@ class WC_Emails {
|
|||
|
||||
if ( $plain_text ) {
|
||||
|
||||
foreach ( $meta as $key => $value )
|
||||
echo $key . ': ' . $value . "\n";
|
||||
foreach ( $meta as $key => $value ) {
|
||||
if ( $value ) {
|
||||
echo $key . ': ' . $value . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
foreach ( $meta as $key => $value )
|
||||
echo '<p><strong>' . $key . ':</strong> ' . $value . '</p>';
|
||||
foreach ( $meta as $key => $value ) {
|
||||
if ( $value ) {
|
||||
echo '<p><strong>' . $key . ':</strong> ' . $value . '</p>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue