WordPress at Your Fingertips
function is not described

WC_Rate_Limiter::set_rate_limit() public WC 1.0

Sets the rate limit delay in seconds for action with identifier $id.

{} It's a method of the class: WC_Rate_Limiter{}

No Hooks.


true|false. True if the option setting was successful, false otherwise.


$result = WC_Rate_Limiter::set_rate_limit( $action_id, $delay );
$action_id(string) (required)
Identifier of the action.
$delay(int) (required)
Delay in seconds.

Code of WC_Rate_Limiter::set_rate_limit() WC 5.9.0

public static function set_rate_limit( $action_id, $delay ) {
	$option_name         = self::storage_id( $action_id );
	$next_try_allowed_at = time() + $delay;
	return update_option( $option_name, $next_try_allowed_at );