I’m trying to show all product names by one customer who ordered multiple products but report shows only single product title:
Can someone help me
`$order = wc_get_order($product->order_id);
$customerName = $order->get_billing_first_name().’ ‘.$order->get_billing_last_name();
$billingCity = $order->get_billing_city();
$billingAddress1 = $order->get_billing_address_1();
$customer_note = $order->get_customer_note();
//echo $product->order_id;
//echo $customerName.$city.$billingAddress1;
//echo ‘<pre>’;print_r($order);exit;
/*usama*/
foreach ($_POST[‘fields’] as $field) {
switch ($field) {
case ‘order_id’:
$row[] = $product->order_id;
break;
case ‘product_name’:
$row[] = html_entity_decode(get_the_title($product->product_id));
break;
case ‘quantity_sold’:
$row[] = $product->quantity;
break;
case ‘gross_sales’:
$row[] = $product->gross;
break; `