Also allow null for date-time for BW

This commit is contained in:
vedanshujain 2020-08-13 16:49:44 +05:30
parent 3dd508fd35
commit 4b1ebea800
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ abstract class WC_REST_Controller extends WP_REST_Controller {
* Custom types are not supported as of WP 5.5, this translates type => 'date-time' to type => 'string'.
*/
if ( 'date-time' === $params['type'] ) {
$params['type'] = 'string';
$params['type'] = array( 'null', 'string' );
}
/**