Fix product reviews schema date fields to use new (WP 5.5) `date-time` format (https://github.com/woocommerce/woocommerce-blocks/pull/3109)
* update dates in ProductReviewSchema to 5.5 date-time format: - https://developer.wordpress.org/rest-api/extending-the-rest-api/schema/#format * fix formatted date schema - is human readable, not 'date-time'
This commit is contained in:
parent
dfd57b0ee8
commit
2edbd03080
|
@ -51,7 +51,8 @@ class ProductReviewSchema extends AbstractSchema {
|
|||
],
|
||||
'date_created' => [
|
||||
'description' => __( "The date the review was created, in the site's timezone.", 'woo-gutenberg-products-block' ),
|
||||
'type' => 'date-time',
|
||||
'type' => 'string',
|
||||
'format' => 'date-time',
|
||||
'context' => [ 'view', 'edit' ],
|
||||
'readonly' => true,
|
||||
],
|
||||
|
@ -63,7 +64,8 @@ class ProductReviewSchema extends AbstractSchema {
|
|||
],
|
||||
'date_created_gmt' => [
|
||||
'description' => __( 'The date the review was created, as GMT.', 'woo-gutenberg-products-block' ),
|
||||
'type' => 'date-time',
|
||||
'type' => 'string',
|
||||
'format' => 'date-time',
|
||||
'context' => [ 'view', 'edit' ],
|
||||
'readonly' => true,
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue