If you ever want to show products which a customer ordered right on “Orders” page within WordPress/Woocommerce dashboard then you are at right place.

Here is a little snippet which you can add in functions.php file of your theme or your custom plugin. This code will add a new column named “Products” and will show product name and quantity right on orders page without you having to open each individual order. This comes in handy for busy stores which usually have lot of orders to process.

//Add new column on order page
add_filter( 'manage_edit-shop_order_columns', 'show_product_order',15 );
function show_product_order($columns){

   $reordered_columns = array();
   
    foreach( $columns as $key => $column){
        $reordered_columns[$key] = $column;
        if( $key ==  'order_status' ){
            // Inserting after "Status" column
            $reordered_columns['product-display'] = __( 'Products');
        }
    }
    return $reordered_columns;
   
}

add_action( 'manage_shop_order_posts_custom_column' , 'ehsan_product_order_column', 10, 2 );
function ehsan_product_order_column( $column ) {
 global $post, $woocommerce, $the_order;

    switch ( $column ) {

        case 'product-display' :
            $terms = $the_order->get_items();

          if ( is_array( $terms ) ) {
                foreach($terms as $term)
        {
					
		$product = wc_get_product($term->get_product_id());
		$sku = $product->get_sku();
		
		$sku_markup = '';
		if ($sku) {
			$sku_markup = '<br><strong>SKU: '.esc_html($sku).'</strong>';
		}
		$product_image = '';
		$image_id = $product->image_id;
		if($image_id) {
			$product_image = wp_get_attachment_image($image_id, array('80', '80') );
		}
					
        echo $product_image . '<br>' . $term['quantity'] .' x ' . $term['name'] . $sku_markup. ' <hr>';
        }
              } else {
                _e( 'Unable to fetch products', 'woocommerce' );
        }
            break;

    }
}