WC_Rate_Limiter::set_rate_limit( string $action_id, int $delay )
Sets the rate limit delay in seconds for action with identifier $id.
Description Description
Parameters Parameters
- $action_id
-
(Required) Identifier of the action.
- $delay
-
(Required) Delay in seconds.
Return Return
(bool) True if the option setting was successful, false otherwise.
Source Source
File: includes/class-wc-rate-limiter.php
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 ); }