Add 'locale' to list of customer meta keys, and update expected type for 'object' for gateways, products, and shipping zones to fix some API issues.

This commit is contained in:
Justin Shreve 2016-12-07 12:23:23 -08:00
parent b0ef92c30e
commit 63a29dd4db
4 changed files with 4 additions and 3 deletions

View File

@ -377,7 +377,7 @@ class WC_REST_Payment_Gateways_Controller extends WC_REST_Controller {
),
'settings' => array(
'description' => __( 'Payment gateway settings.', 'woocommerce' ),
'type' => 'array',
'type' => 'object',
'context' => array( 'view', 'edit' ),
),
),

View File

@ -2122,7 +2122,7 @@ class WC_REST_Products_Controller extends WC_REST_Posts_Controller {
),
'images' => array(
'description' => __( 'List of images.', 'woocommerce' ),
'type' => 'array',
'type' => 'object',
'context' => array( 'view', 'edit' ),
'items' => array(
'type' => 'object',

View File

@ -453,7 +453,7 @@ class WC_REST_Shipping_Zone_Methods_Controller extends WC_REST_Shipping_Zones_Co
),
'settings' => array(
'description' => __( 'Shipping method settings.', 'woocommerce' ),
'type' => 'array',
'type' => 'object',
'context' => array( 'view', 'edit' ),
),
),

View File

@ -19,6 +19,7 @@ class WC_Customer_Data_Store extends WC_Data_Store_WP implements WC_Customer_Dat
* @var array
*/
protected $internal_meta_keys = array(
'locale',
'billing_postcode',
'billing_city',
'billing_address_1',