WordPress at a glance
function is not described

wc_get_email_order_items() WC 3.0.0

Get HTML for the order items to be shown in emails.

Return

String.

Usage

wc_get_email_order_items( $order, $args );
$order(WC_Order) (required)
Order object.
$args(array)
Arguments.
Default: array()

Changelog

Since 3.0.0 Introduced.

Code of wc get email order items: woocommerce/includes/wc-template-functions.php WC 3.7.0

<?php
function wc_get_email_order_items( $order, $args = array() ) {
	ob_start();

	$defaults = array(
		'show_sku'      => false,
		'show_image'    => false,
		'image_size'    => array( 32, 32 ),
		'plain_text'    => false,
		'sent_to_admin' => false,
	);

	$args     = wp_parse_args( $args, $defaults );
	$template = $args['plain_text'] ? 'emails/plain/email-order-items.php' : 'emails/email-order-items.php';

	wc_get_template(
		$template,
		apply_filters(
			'woocommerce_email_order_items_args',
			array(
				'order'               => $order,
				'items'               => $order->get_items(),
				'show_download_links' => $order->is_download_permitted() && ! $args['sent_to_admin'],
				'show_sku'            => $args['show_sku'],
				'show_purchase_note'  => $order->is_paid() && ! $args['sent_to_admin'],
				'show_image'          => $args['show_image'],
				'image_size'          => $args['image_size'],
				'plain_text'          => $args['plain_text'],
				'sent_to_admin'       => $args['sent_to_admin'],
			)
		)
	);

	return apply_filters( 'woocommerce_email_order_items_table', ob_get_clean(), $order );
}