Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 937d905

Browse files
committed
Also allow null for date-time for BW
1 parent 765fe6d commit 937d905

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controllers/Version3/class-wc-rest-controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ protected function adjust_wp_5_5_datatype_compatibility( $endpoint_args ) {
124124
* Custom types are not supported as of WP 5.5, this translates type => 'date-time' to type => 'string'.
125125
*/
126126
if ( 'date-time' === $params['type'] ) {
127-
$params['type'] = 'string';
127+
$params['type'] = array( 'null', 'string' );
128128
}
129129

130130
/**

0 commit comments

Comments
 (0)