Fix path for `segment_label` in Products & Variations schema

This commit is contained in:
Tomek Wytrębowicz 2023-05-02 16:11:58 +02:00
parent fbd377b2ec
commit d35e8f3c46
2 changed files with 4 additions and 4 deletions

View File

@ -173,7 +173,7 @@ class Controller extends GenericStatsController {
);
$schema['properties']['totals']['properties']['segments']['items']['properties']['segment_label'] = $segment_label;
$schema['properties']['intervals']['items']['properties']['subtotals']['properties'] = $segment_label;
$schema['properties']['intervals']['items']['properties']['subtotals']['properties']['segments']['items']['properties']['segment_label'] = $segment_label;
return $this->add_additional_fields_schema( $schema );
}

View File

@ -177,7 +177,7 @@ class Controller extends GenericStatsController {
);
$schema['properties']['totals']['properties']['segments']['items']['properties']['segment_label'] = $segment_label;
$schema['properties']['intervals']['items']['properties']['subtotals']['properties'] = $segment_label;
$schema['properties']['intervals']['items']['properties']['subtotals']['properties']['segments']['items']['properties']['segment_label'] = $segment_label;
return $this->add_additional_fields_schema( $schema );
}