Automattic\WooCommerce\StoreApi\Utilities
RateLimits::get_rate_limit
Returns current rate limit values using cache where possible.
Method of the class: RateLimits{}
No Hooks.
Returns
Object.
Usage
$result = RateLimits::get_rate_limit( $action_id ): object;
- $action_id(string) (required)
- Identifier of the action.
RateLimits::get_rate_limit() RateLimits::get rate limit code WC 10.4.3
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;
}