WC_Helper_API_Backoff::get_all_bounds │ private static │ WC 1.0

Backoff bounds per request type, in seconds.

default is the window applied only when the response carries no usable rate-limit header. max is the ceiling that an explicit header value is capped at — a safety net against an unexpectedly distant reset locking the endpoint out. An explicit header shorter than default (e.g. a global rate limit's brief Retry-After) is honored as-is, not floored.

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

Хуков нет.

Возвращает

array<string, array{default:int, max:int}>.

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

$result = WC_Helper_API_Backoff::get_all_bounds(): array;

Код WC_Helper_API_Backoff::get_all_bounds() WC 11.2.2

private static function get_all_bounds(): array {
	return array(
		self::REQUEST_TYPE_UPDATE_CHECK  => array(
			'default' => HOUR_IN_SECONDS,
			'max'     => HOUR_IN_SECONDS * 3,
		),
		self::REQUEST_TYPE_SUBSCRIPTIONS => array(
			'default' => 15 * MINUTE_IN_SECONDS,
			'max'     => HOUR_IN_SECONDS * 3,
		),
	);
}