Automattic\WooCommerce\Admin\API\Reports\Orders
Controller::get_products()
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() Controller::get products code WC 9.3.3
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 ); }