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

Automattic\WooCommerce\Admin\API\Reports

TimeInterval::next_week_start() public WC 1.0

Returns DateTime object representing the next week start, or previous week end if reversed.

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

Хуков нет.

Возвращает

DateTime.

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

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

Код TimeInterval::next_week_start() WC 4.7.1

<?php
public static function next_week_start( $datetime, $reversed = false ) {
	$first_day_of_week = absint( get_option( 'start_of_week' ) );
	$initial_week_no   = self::week_number( $datetime, $first_day_of_week );

	do {
		$datetime        = self::next_day_start( $datetime, $reversed );
		$current_week_no = self::week_number( $datetime, $first_day_of_week );
	} while ( $current_week_no === $initial_week_no );

	// The week 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' );
		$end_of_day_timestamp = floor( $timestamp / DAY_IN_SECONDS ) * DAY_IN_SECONDS + DAY_IN_SECONDS - 1;
		$datetime->setTimestamp( $end_of_day_timestamp );
	}

	return $datetime;
}