WordPress at Your Fingertips
function is not described


Segmenter::add_intervals_segments() public WC 1.0

Adds an array of segments to data->intervals object.

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

No Hooks.


null. Nothing.


$Segmenter = new Segmenter();
$Segmenter->add_intervals_segments( $data, $intervals_query, $table_name );
$data(stdClass) (required) (passed by reference — &)
Data object representing the REST response.
$intervals_query(array) (required)
Intervals SQL query parameters.
$table_name(string) (required)
Name of the SQL table that is the main order stats table.

Code of Segmenter::add_intervals_segments() WC 6.1.0

public function add_intervals_segments( &$data, $intervals_query, $table_name ) {
	$intervals_segments = $this->get_segments( 'intervals', $intervals_query, $table_name );

	$this->assign_segments_to_intervals( $data->intervals, $intervals_segments );
	$this->fill_in_missing_interval_segments( $data );