Automattic\WooCommerce\Admin\API\Reports\Categories
DataStore::assign_report_columns()
Assign report columns once full table name has been assigned.
Метод класса: DataStore{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->assign_report_columns();
Код DataStore::assign_report_columns() DataStore::assign report columns WC 8.7.0
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", ); }