WC_Helper_API_Backoff::get_bounds │ private static │ WC 1.0

Backoff bounds for a single request type, in seconds.

Unknown request types fall back to a conservative default.

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

Хуков нет.

Возвращает

array{default:int, max:int}.

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

$result = WC_Helper_API_Backoff::get_bounds( $request_type ): array;
$request_type(строка) (обязательный)
The Helper API request type (e.g. 'update-check').

Код WC_Helper_API_Backoff::get_bounds() WC 11.2.2

private static function get_bounds( string $request_type ): array {
	$fallback = array(
		'default' => HOUR_IN_SECONDS,
		'max'     => WEEK_IN_SECONDS,
	);

	return self::get_all_bounds()[ $request_type ] ?? $fallback;
}