Initial work on showing labels for non-coffee items

This commit is contained in:
3wc 2024-06-10 20:56:15 -05:00
parent f1e9f53c41
commit 2046a23a4b

View File

@ -123,12 +123,12 @@ if(!is_user_logged_in()){
}
}
if (!$is_coffee && !$is_subscription) {
continue;
}
if ($is_coffee || $is_subscription) {
$brew_method = $item->get_meta("pa_brew-method");
$weight = $item->get_meta("weight");
} else {
$product_name = $item->get_name();
}
if ($is_coffee) {
// Non-subscription order
@ -160,11 +160,15 @@ if(!is_user_logged_in()){
<div class="label">
<div>
<div class="product-details">
<?php if ($is_coffee || $is_subscription) { ?>
<p class="weight"><?php echo $weight; ?></p>
<?php } ?>
<p class="origin"><?php echo $product_name; ?></p>
<?php if ($is_coffee || $is_subscription) { ?>
<p class="bean-type"><?php echo $brew_method; ?></p>
<p class="roast"><?php echo $roast; ?> Roast</p>
<p class="date">Roasted on: <span><?php echo $roast_date; ?></span></p>
<?php } ?>
<p class="code"><?php
echo $is_new ? "N" : "";
echo $gift_message ? "G" : "";