WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

Automattic\WooCommerce\Admin\API\Reports

TimeInterval::next_day_start() public WC 1.0

Returns a new DateTime object representing the next day start, or previous day end if reversed.

{} Это метод класса: TimeInterval{}

Хуков нет.

Возвращает

DateTime.

Использование

$result = TimeInterval::next_day_start( $datetime, $reversed );
$datetime(DateTime) (обязательный)
Date and time.
$reversed(true/false)
Going backwards in time instead of forward.
По умолчанию: false

Код TimeInterval::next_day_start() WC 4.7.1

<?php
public static function next_day_start( $datetime, $reversed = false ) {
	$seconds_into_day = (int) $datetime->format( 'H' ) * HOUR_IN_SECONDS + (int) $datetime->format( 'i' ) * MINUTE_IN_SECONDS + (int) $datetime->format( 's' );

	// The day boundary is actually next midnight when going in reverse, so set it to day -1 at 23:59:59.
	if ( $reversed ) {
		$timestamp          = (int) $datetime->format( 'U' );
		$next_day_timestamp = $timestamp - ( $seconds_into_day + 1 );
	} else {
		$day_increment = new \DateInterval( 'P1D' ); // Plus 1 Day.
		$next_datetime = clone $datetime;
		$next_datetime->add( $day_increment );
		$timestamp          = (int) $next_datetime->format( 'U' );
		$next_day_timestamp = $timestamp - $seconds_into_day;
	}

	$next_day = new \DateTime();
	$next_day->setTimestamp( $next_day_timestamp );
	$next_day->setTimezone( new \DateTimeZone( wc_timezone_string() ) );
	return $next_day;
}