WordPress at a glance
function is not described


DataStore::get_fields() protected WC 1.0

Returns a comma separated list of the fields in the query_args, if there aren't, returns report_columns keys.

{} It's a method of the class: DataStore{}

No Hooks.


Array. Nothing.


// protected - for code of main (parent) or child class
$result = $this->get_fields( $query_args );
$query_args(array) (required)
Parameters supplied by the user.

Code of DataStore::get_fields() WC 5.3.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 );