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.
Method of the class: DataStore{}
No Hooks.
Returns
array.
Usage
// protected - for code of main (parent) or child class $result = $this->get_fields( $query_args );
- $query_args(array) (required)
- Parameters supplied by the user.
DataStore::get_fields() DataStore::get fields code WC 11.1.2
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 );
}