Merge pull request #17748 from woocommerce/fix/orders-rest-api-schema-types

Rest API: Update the schema types for tax_class and price
This commit is contained in:
Claudio Sanches 2017-11-17 17:54:10 -02:00 committed by GitHub
commit 3f6dfb531c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1159,7 +1159,7 @@ class WC_REST_Orders_Controller extends WC_REST_Legacy_Orders_Controller {
),
'tax_class' => array(
'description' => __( 'Tax class of product.', 'woocommerce' ),
'type' => 'integer',
'type' => 'string',
'context' => array( 'view', 'edit' ),
),
'subtotal' => array(
@ -1244,7 +1244,7 @@ class WC_REST_Orders_Controller extends WC_REST_Legacy_Orders_Controller {
),
'price' => array(
'description' => __( 'Product price.', 'woocommerce' ),
'type' => 'string',
'type' => 'number',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),

View File

@ -1238,7 +1238,7 @@ class WC_REST_Orders_V1_Controller extends WC_REST_Posts_Controller {
),
'tax_class' => array(
'description' => __( 'Tax class of product.', 'woocommerce' ),
'type' => 'integer',
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),