Filter
rpress_reservation_rate_limit
On this page
Filters how many reservation requests one IP address may submit per hour.
Read by rpress_reservation_rate_limit_state() on every reservation form submission. Each successful submission increments a transient keyed by the client IP and kept for one hour; once the count reaches this limit further requests are rejected with an error. Users who can edit_shop_payments are exempt.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | int | Default limit of successful requests per IP address per hour. |
Return value#
int. Maximum number of requests allowed per IP address in one hour.
Example#
function my_reservation_rate_limit( $limit ) {
return 10;
}
add_filter( 'rpress_reservation_rate_limit', 'my_reservation_rate_limit' );
Notes#
The first parameter is a literal default (5), not a variable. The IP comes from rpress_reservation_client_ip().
Source#
Applied in:
includes/features/reservations/frontend.php(line 100), inrpress_reservation_rate_limit_state()
See also#
Was this page helpful?
