Automattic\WooCommerce\Internal\RestApi\Routes\V4\Fulfillments\Schema
FulfillmentSchema::format_utc_iso8601
Format a UTC 'Y-m-d H:i:s' string as ISO 8601 with explicit 'Z' suffix.
Method of the class: FulfillmentSchema{}
No Hooks.
Returns
String|null.
Usage
// private - for code of main (parent) class only $result = $this->format_utc_iso8601( ?string $date ): ?string;
- ?string $date(required)
- .
Changelog
| Since 10.8.0 | Introduced. |
FulfillmentSchema::format_utc_iso8601() FulfillmentSchema::format utc iso8601 code WC 10.9.4
private function format_utc_iso8601( ?string $date ): ?string {
if ( null === $date || '' === $date ) {
return null;
}
$formatted = wc_rest_prepare_date_response( $date );
return null === $formatted ? null : $formatted . 'Z';
}