Automattic\WooCommerce\StoreApi\Utilities

RateLimits::get_rate_limit()public staticWC 1.0

Returns current rate limit values using cache where possible.

Method of the class: RateLimits{}

No Hooks.

Return

Object.

Usage

$result = RateLimits::get_rate_limit( $action_id );
$action_id(string) (required)
Identifier of the action.

RateLimits::get_rate_limit() code WC 8.7.0

public static function get_rate_limit( $action_id ) {
	$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;
}