Below is the code which give output as " SKU:1018 SKU:1026 ". I am not able to get the desired output from this code please help
I want output like "SKU:1018,1026 "
<?php
$new= $order->get_items();
foreach ( $new as $item ) {
$product_id = $item['product_id'];
$prod = new WC_Product($product_id);
$sku=$prod->get_sku();
echo "SKU:".$sku." ";
}
?>