Quantcast
Channel: WordPress.org Forums » [WooCommerce] Support
Viewing all articles
Browse latest Browse all 102165

Get Order Names in one String

$
0
0

Replies: 0

Hey guys,

i want to get all product names of the order in one string.
So what i did was:

$items = $order->get_items();
 foreach ( $items as $item ) {
 $product_name = $item['name'];
 $quantity=$item['qty'];
}

but out of the foreach $product_name just has the last product that was added.
I need all product names in this string.
How can I add up all the names?

Thanks in advance.


Viewing all articles
Browse latest Browse all 102165

Trending Articles