Automattic\WooCommerce\Admin\API\Reports
DataStore::get_fields
Returns a comma separated list of the fields in the query_args, if there aren't, returns report_columns keys.
Метод класса: DataStore{}
Хуков нет.
Возвращает
Массив.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_fields( $query_args );
- $query_args(массив) (обязательный)
- Parameters supplied by the user.
Код DataStore::get_fields() DataStore::get fields WC 11.0.0
protected function get_fields( $query_args ) {
if ( isset( $query_args['fields'] ) && is_array( $query_args['fields'] ) ) {
return $query_args['fields'];
}
return array_keys( $this->report_columns );
}