woocommerce_store_api_rate_limit_exceeded
Fires when the rate limit is exceeded.
Usage
add_action( 'woocommerce_store_api_rate_limit_exceeded', 'wp_kama_woocommerce_store_api_rate_limit_exceeded_action', 10, 2 ); /** * Function for `woocommerce_store_api_rate_limit_exceeded` action-hook. * * @param string $ip_address The IP address of the request. * @param string $action_id The grouping identifier to the request. * * @return void */ function wp_kama_woocommerce_store_api_rate_limit_exceeded_action( $ip_address, $action_id ){ // action... }
- $ip_address(string)
- The IP address of the request.
- $action_id(string)
- The grouping identifier to the request.
Changelog
Since 8.9.0 | Introduced. |
Since 9.8.0 | Added $action_id parameter. |
Where the hook is called
woocommerce_store_api_rate_limit_exceeded
woocommerce/src/StoreApi/Authentication.php 214-218
do_action( 'woocommerce_store_api_rate_limit_exceeded', self::get_ip_address( $rate_limiting_options->proxy_support ), $action_id );