Automattic\WooCommerce\Admin\API\Reports\Categories
DataStore::assign_report_columns
Assign report columns once full table name has been assigned.
Method of the class: DataStore{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->assign_report_columns();
DataStore::assign_report_columns() DataStore::assign report columns code WC 10.3.6
protected function assign_report_columns() {
$table_name = self::get_db_table_name();
$this->report_columns = array(
'items_sold' => 'SUM(product_qty) as items_sold',
'net_revenue' => 'SUM(product_net_revenue) AS net_revenue',
'orders_count' => "COUNT(DISTINCT {$table_name}.order_id) as orders_count",
'products_count' => "COUNT(DISTINCT {$table_name}.product_id) as products_count",
);
}