WC_Tracker::is_retryable_status │ private static │ WC 1.0

Whether a delivery failure with the given status is worth retrying.

Transport failures (status 0), rate limiting, timeouts and server errors are retried; other client errors mean the snapshot itself was rejected.

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

Хуков нет.

Возвращает

bool.

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

$result = WC_Tracker::is_retryable_status( $status );
$status(int) (обязательный)
HTTP status code, 0 for a transport failure.

Код WC_Tracker::is_retryable_status() WC 11.3.0

private static function is_retryable_status( $status ) {
	return 0 === $status || in_array( $status, array( 408, 425, 429 ), true ) || 500 <= $status;
}