Address review comments

This commit is contained in:
vedanshujain 2020-08-13 16:36:27 +05:30
parent dd9b9cfae2
commit 3dd508fd35
2 changed files with 6 additions and 2 deletions

View File

@ -981,7 +981,7 @@ class WC_REST_Product_Variations_V2_Controller extends WC_REST_Products_V2_Contr
'context' => array( 'view', 'edit' ),
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce-rest-api' ),
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),

View File

@ -99,7 +99,11 @@ abstract class WC_REST_Controller extends WP_REST_Controller {
}
/**
* Change datatypes `date-time` to string, and `mixed` to composite of all built in types.
* Change datatypes `date-time` to string, and `mixed` to composite of all built in types. This is required for maintaining forward compatibility with WP 5.5 since custom post types are not supported anymore.
*
* See @link https://core.trac.wordpress.org/changeset/48306
*
* We still use the 'mixed' type, since if we convert to composite type everywhere, it won't work in 5.4 anymore because they require to define the full schema.
*
* @param array $endpoint_args Schema with datatypes to convert.