get_billing_first_name(); $last_name = $order->get_billing_last_name(); $postcode = $order->get_billing_postcode(); $items = $order->get_items(); $order_date = $order->get_date_created()->date('d/m/Y'); $gift_message = $order->get_meta('_shipping_gift_message'); ?> Coffee Label
get_product_id(); $product_categories = get_the_terms($product_id, 'product_cat'); $is_coffee = false; if (!empty($product_categories) && !is_wp_error($product_categories)) { foreach ($product_categories as $product_category) { if ($product_category->slug == 'coffee') { $is_coffee = true; break; } } } if ($is_coffee) { $quantity = $item->get_quantity(); $product_name = $item->get_name(); $brew_method = $item->get_meta('pa_brew-method'); $weight = $item->get_meta('weight'); $roast = get_field('roast_level', $product_id); $is_organic = get_field('is_organic', $product_id); for ($i = 0; $i < $quantity; $i++) { ?>

Roast

Roasted on:

N