Automattic\WooCommerce\Internal\PushNotifications\Controllers

StepLogRestController::get_range_args │ private │ WC 1.0

The from and to arguments every route accepts, as Unix timestamps.

Метод класса: StepLogRestController{}

Хуков нет.

Возвращает

array.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_range_args(): array;

Код StepLogRestController::get_range_args() WC 11.3.0

private function get_range_args(): array {
	return array(
		'limit' => array(
			'description'       => __( 'Rows to return, newest first. A page carries every row of its last second, so it can exceed this.', 'woocommerce' ),
			'type'              => 'integer',
			'default'           => self::DEFAULT_LIMIT,
			'minimum'           => 1,
			'maximum'           => self::MAX_LIMIT,
			'sanitize_callback' => 'absint',
			'validate_callback' => 'rest_validate_request_arg',
		),
		'from'  => array(
			'description'       => __( 'Earliest Unix timestamp to include. Defaults to 48 hours before `to`, and is clamped to 90 days before it.', 'woocommerce' ),
			'type'              => 'integer',
			'minimum'           => 0,
			'sanitize_callback' => 'absint',
			'validate_callback' => 'rest_validate_request_arg',
		),
		'to'    => array(
			'description'       => __( 'Latest Unix timestamp to include. Defaults to now.', 'woocommerce' ),
			'type'              => 'integer',
			'minimum'           => 0,
			'sanitize_callback' => 'absint',
			'validate_callback' => 'rest_validate_request_arg',
		),
	);
}