Automattic\WooCommerce\Admin\API\Reports

Segmenter::get_totals_segments()publicWC 1.0

Returns an array of segments for totals part of REST response.

Method of the class: Segmenter{}

No Hooks.

Return

Array.

Usage

$Segmenter = new Segmenter();
$Segmenter->get_totals_segments( $query_params, $table_name );
$query_params(array) (required)
Totals SQL query parameters.
$table_name(string) (required)
Name of the SQL table that is the main order stats table.

Segmenter::get_totals_segments() code WC 8.7.0

public function get_totals_segments( $query_params, $table_name ) {
	$segments = $this->get_segments( 'totals', $query_params, $table_name );
	$segments = $this->fill_in_missing_segments( $segments );

	return $segments;
}