generated from autonomic-cooperative/wordpress-starter
	Show total order items in label counter
This commit is contained in:
		| @ -87,12 +87,12 @@ | ||||
|       $last_name = $order->get_billing_last_name(); | ||||
|       $postcode = $order->get_billing_postcode(); | ||||
|       $items = $order->get_items(); | ||||
|       $total_items = $order->get_item_count(); | ||||
|       $roast_date = (new DateTime())->modify("-3 days")->format("d/m/Y"); | ||||
|       $gift_message = $order->get_meta("_shipping_gift_message"); | ||||
|  | ||||
|       $order_subscription_coffees = get_field("coffees", $order_id); | ||||
|  | ||||
|       $j = 0; // Count order items | ||||
|       foreach ($items as $item) { | ||||
|           // checking if product is a coffee | ||||
|           $product_id = $item->get_product_id(); | ||||
| @ -166,7 +166,7 @@ | ||||
|             <div class="order-details"> | ||||
|               <p class="customer-name"><?php echo "$first_name $last_name"; ?></p> | ||||
|               <p class="purchase-code"><?php echo $postcode; ?></p> | ||||
|               <p class="quantity"><?php echo $quantity; ?></p> | ||||
|               <p class="quantity"><?php echo $total_items; ?></p> | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|  | ||||
		Reference in New Issue
	
	Block a user