From 663e454b8fd0daeb2bb1c09120ce844ae66cfe0f Mon Sep 17 00:00:00 2001 From: Peter Fabian Date: Fri, 1 Feb 2019 18:30:39 +0100 Subject: [PATCH] Fixed schema: type and enum for segment_id. --- .../class-wc-admin-rest-reports-coupons-stats-controller.php | 3 +-- .../class-wc-admin-rest-reports-orders-stats-controller.php | 3 +-- .../class-wc-admin-rest-reports-products-stats-controller.php | 3 +-- .../class-wc-admin-rest-reports-revenue-stats-controller.php | 3 +-- .../api/class-wc-admin-rest-reports-taxes-stats-controller.php | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-coupons-stats-controller.php b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-coupons-stats-controller.php index b99e526eb32..5aa963ff458 100644 --- a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-coupons-stats-controller.php +++ b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-coupons-stats-controller.php @@ -172,10 +172,9 @@ class WC_Admin_REST_Reports_Coupons_Stats_Controller extends WC_REST_Reports_Con 'properties' => array( 'segment_id' => array( 'description' => __( 'Segment identificator.', 'wc-admin' ), - 'type' => 'string', + 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, - 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'subtotals' => array( 'description' => __( 'Interval subtotals.', 'wc-admin' ), diff --git a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-orders-stats-controller.php b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-orders-stats-controller.php index 549badede97..3fba1631a14 100644 --- a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-orders-stats-controller.php +++ b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-orders-stats-controller.php @@ -217,10 +217,9 @@ class WC_Admin_REST_Reports_Orders_Stats_Controller extends WC_Admin_REST_Report 'properties' => array( 'segment_id' => array( 'description' => __( 'Segment identificator.', 'wc-admin' ), - 'type' => 'string', + 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, - 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'subtotals' => array( 'description' => __( 'Interval subtotals.', 'wc-admin' ), diff --git a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-products-stats-controller.php b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-products-stats-controller.php index a5436bb30d4..945091bf466 100644 --- a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-products-stats-controller.php +++ b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-products-stats-controller.php @@ -184,10 +184,9 @@ class WC_Admin_REST_Reports_Products_Stats_Controller extends WC_REST_Reports_Co 'properties' => array( 'segment_id' => array( 'description' => __( 'Segment identificator.', 'wc-admin' ), - 'type' => 'string', + 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, - 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'subtotals' => array( 'description' => __( 'Interval subtotals.', 'wc-admin' ), diff --git a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-revenue-stats-controller.php b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-revenue-stats-controller.php index 15749a93342..73f48a05dd9 100644 --- a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-revenue-stats-controller.php +++ b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-revenue-stats-controller.php @@ -213,10 +213,9 @@ class WC_Admin_REST_Reports_Revenue_Stats_Controller extends WC_REST_Reports_Con 'properties' => array( 'segment_id' => array( 'description' => __( 'Segment identificator.', 'wc-admin' ), - 'type' => 'string', + 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, - 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'subtotals' => array( 'description' => __( 'Interval subtotals.', 'wc-admin' ), diff --git a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-taxes-stats-controller.php b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-taxes-stats-controller.php index 290b8712df0..1ae6c0cd590 100644 --- a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-taxes-stats-controller.php +++ b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-reports-taxes-stats-controller.php @@ -212,10 +212,9 @@ class WC_Admin_REST_Reports_Taxes_Stats_Controller extends WC_REST_Reports_Contr 'properties' => array( 'segment_id' => array( 'description' => __( 'Segment identificator.', 'wc-admin' ), - 'type' => 'string', + 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, - 'enum' => array( 'day', 'week', 'month', 'year' ), ), 'subtotals' => array( 'description' => __( 'Interval subtotals.', 'wc-admin' ),