Revert "Fix compatibility for WP 5.5"

This reverts commit cc96f6bbd1.
This commit is contained in:
vedanshujain 2020-08-12 19:31:40 +05:30
parent 29bc98816e
commit 083e529668
12 changed files with 28 additions and 42 deletions

View File

@ -511,7 +511,7 @@ class WC_REST_Coupons_V2_Controller extends WC_REST_CRUD_Controller {
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
),

View File

@ -350,7 +350,7 @@ class WC_REST_Customers_V2_Controller extends WC_REST_Customers_V1_Controller {
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
),

View File

@ -410,7 +410,7 @@ class WC_REST_Order_Refunds_V2_Controller extends WC_REST_Orders_V2_Controller {
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
),
@ -432,13 +432,13 @@ class WC_REST_Order_Refunds_V2_Controller extends WC_REST_Orders_V2_Controller {
),
'name' => array(
'description' => __( 'Product name.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'product_id' => array(
'description' => __( 'Product ID.', 'woocommerce' ),
'type' => array( 'integer', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
@ -535,7 +535,7 @@ class WC_REST_Order_Refunds_V2_Controller extends WC_REST_Orders_V2_Controller {
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),

View File

@ -1170,7 +1170,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
),
@ -1191,12 +1191,12 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
),
'name' => array(
'description' => __( 'Product name.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
'product_id' => array(
'description' => __( 'Product ID.', 'woocommerce' ),
'type' => array( 'integer' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
'variation_id' => array(
@ -1282,7 +1282,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
),
@ -1373,7 +1373,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
),
@ -1397,12 +1397,12 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
),
'method_title' => array(
'description' => __( 'Shipping method name.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
'method_id' => array(
'description' => __( 'Shipping method ID.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
'instance_id' => array(
@ -1464,7 +1464,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
),
@ -1488,7 +1488,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
),
'name' => array(
'description' => __( 'Fee name.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
'tax_class' => array(
@ -1562,7 +1562,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
),
@ -1586,7 +1586,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
),
'code' => array(
'description' => __( 'Coupon code.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
'discount' => array(
@ -1620,7 +1620,7 @@ class WC_REST_Orders_V2_Controller extends WC_REST_CRUD_Controller {
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
),

View File

@ -799,7 +799,7 @@ class WC_REST_Product_Variations_V2_Controller extends WC_REST_Products_V2_Contr
),
'manage_stock' => array(
'description' => __( 'Stock management at variation level.', 'woocommerce' ),
'type' => array( 'boolean', 'null' ),
'type' => 'mixed',
'default' => false,
'context' => array( 'view', 'edit' ),
),
@ -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' ),
'description' => __( 'Meta value.', 'woocommerce-rest-api' ),
'type' => array( 'string', 'null' ),
'context' => array( 'view', 'edit' ),
),

View File

@ -2084,7 +2084,7 @@ class WC_REST_Products_V2_Controller extends WC_REST_CRUD_Controller {
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
),

View File

@ -530,18 +530,12 @@ class WC_REST_Setting_Options_V2_Controller extends WC_REST_Controller {
),
'value' => array(
'description' => __( 'Setting value.', 'woocommerce' ),
'type' => array( 'string', 'array', 'null' ),
'items' => array(
'type' => array( 'string', 'null' ),
),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
'default' => array(
'description' => __( 'Default value for the setting.', 'woocommerce' ),
'type' => array( 'string', 'array', 'null' ),
'items' => array(
'type' => array( 'string', 'null' ),
),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),

View File

@ -91,8 +91,6 @@ abstract class WC_REST_CRUD_Controller extends WC_REST_Posts_Controller {
return true;
}
/**
* Get object permalink.
*

View File

@ -293,7 +293,7 @@ class WC_REST_Customers_Controller extends WC_REST_Customers_V2_Controller {
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
),

View File

@ -736,7 +736,7 @@ class WC_REST_Product_Variations_Controller extends WC_REST_Product_Variations_V
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
),

View File

@ -1288,7 +1288,7 @@ class WC_REST_Products_Controller extends WC_REST_Products_V2_Controller {
),
'value' => array(
'description' => __( 'Meta value.', 'woocommerce' ),
'type' => array( 'string', 'null' ),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
),

View File

@ -199,18 +199,12 @@ class WC_REST_Setting_Options_Controller extends WC_REST_Setting_Options_V2_Cont
),
'value' => array(
'description' => __( 'Setting value.', 'woocommerce' ),
'type' => array( 'string', 'array', 'null' ),
'items' => array(
'type' => array( 'string', 'null' ),
),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
),
'default' => array(
'description' => __( 'Default value for the setting.', 'woocommerce' ),
'type' => array( 'string', 'array', 'null' ),
'items' => array(
'type' => array( 'string', 'null' ),
),
'type' => 'mixed',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),