Automattic\WooCommerce\StoreApi\Utilities
RateLimits::get_rate_limit
Returns current rate limit values using cache where possible.
Метод класса: RateLimits{}
Хуков нет.
Возвращает
Объект.
Использование
$result = RateLimits::get_rate_limit( $action_id ): object;
- $action_id(строка) (обязательный)
- Identifier of the action.
Код RateLimits::get_rate_limit() RateLimits::get rate limit WC 10.7.0
public static function get_rate_limit( string $action_id ): object {
$current_limit = self::get_cached( $action_id );
if ( false === $current_limit ) {
$current_limit = self::get_rate_limit_row( $action_id );
self::set_cache( $action_id, $current_limit );
}
return $current_limit;
}