display organic status

This commit is contained in:
Aadil Ayub 2024-05-07 14:45:31 +00:00
parent aa85dc5afc
commit 7d322af818
1 changed files with 4 additions and 3 deletions

View File

@ -110,7 +110,8 @@ $order_date = $order->get_date_created()->date('d/m/Y');
$product_name = $item->get_name(); $product_name = $item->get_name();
$brew_method = $item->get_meta('pa_brew-method'); $brew_method = $item->get_meta('pa_brew-method');
$weight = $item->get_meta('weight'); $weight = $item->get_meta('weight');
$roast = get_field('roast_level', $product_id); $roast = get_field('roast_level', $product_id);
$is_organic = get_field('is_organic', $product_id);
for ($i = 0; $i < $quantity; $i++) { ?> for ($i = 0; $i < $quantity; $i++) { ?>
<div class="label"> <div class="label">
@ -121,7 +122,7 @@ $order_date = $order->get_date_created()->date('d/m/Y');
<p class="bean-type"><?php echo $brew_method; ?></p> <p class="bean-type"><?php echo $brew_method; ?></p>
<p class="roast"><?php echo $roast; ?> Roast</p> <p class="roast"><?php echo $roast; ?> Roast</p>
<p class="date">Roasted on: <span><?php echo $order_date; ?></span></p> <p class="date">Roasted on: <span><?php echo $order_date; ?></span></p>
<p class="code">NGO</p> <p class="code">NG<?php $is_organic ? 'O' : '' ?></p>
</div> </div>
<div class="order-details"> <div class="order-details">
<p class="customer-name"><?php echo "$first_name $last_name"; ?></p> <p class="customer-name"><?php echo "$first_name $last_name"; ?></p>
@ -135,4 +136,4 @@ $order_date = $order->get_date_created()->date('d/m/Y');
} ?> } ?>
</div> </div>
</body> </body>
</html> </html>