Automattic\WooCommerce\Admin\API\Reports\Orders

Controller::get_products()protectedWC 1.0

Get products column export value.

Method of the class: Controller{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_products( $products );
$products(array) (required)
Products from report row.

Controller::get_products() code WC 7.3.0

protected function get_products( $products ) {
	$products_list = array();

	foreach ( $products as $product ) {
		$products_list[] = sprintf(
			/* translators: 1: numeric product quantity, 2: name of product */
			__( '%1$s× %2$s', 'woocommerce' ),
			$product['quantity'],
			$product['name']
		);
	}

	return implode( ', ', $products_list );
}