From 0f5e6373e44bf66c8626225759fc8b9decf0f6a4 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 22 Mar 2017 18:22:10 -0300 Subject: [PATCH] [REST API] Include GMT dates for images in schema --- .../class-wc-rest-product-variations-controller.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/includes/api/class-wc-rest-product-variations-controller.php b/includes/api/class-wc-rest-product-variations-controller.php index 40b492c4a7b..e227b6cfce6 100644 --- a/includes/api/class-wc-rest-product-variations-controller.php +++ b/includes/api/class-wc-rest-product-variations-controller.php @@ -835,12 +835,24 @@ class WC_REST_Product_Variations_Controller extends WC_REST_Products_Controller 'context' => array( 'view', 'edit' ), 'readonly' => true, ), + 'date_created_gmt' => array( + 'description' => __( 'The date the image was created, as GMT.', 'woocommerce' ), + 'type' => 'date-time', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), 'date_modified' => array( 'description' => __( "The date the image was last modified, in the site's timezone.", 'woocommerce' ), 'type' => 'date-time', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), + 'date_modified_gmt' => array( + 'description' => __( 'The date the image was last modified, as GMT.', 'woocommerce' ), + 'type' => 'date-time', + 'context' => array( 'view', 'edit' ), + 'readonly' => true, + ), 'src' => array( 'description' => __( 'Image URL.', 'woocommerce' ), 'type' => 'string',