woocommerce_store_api_rate_limit_exceeded
Fires when the rate limit is exceeded.
Использование
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(строка)
- The IP address of the request.
- $action_id(строка)
- The grouping identifier to the request.
Список изменений
| С версии 8.9.0 | Введена. |
| С версии 9.8.0 | Added $action_id parameter. |
Где вызывается хук
woocommerce_store_api_rate_limit_exceeded
woocommerce/src/StoreApi/Authentication.php 204-208
do_action( 'woocommerce_store_api_rate_limit_exceeded', self::get_ip_address( $rate_limiting_options->proxy_support ), $action_id );