Hooks

Docs Hooks Pro · PHP hooks

modal_kit_pro_address_daily_limit

filter

Pro

PHP

Change how many times one email address can be sent per day through your site, across all forms. 3 by default.

Runs for each entry the site relays, after the form’s own daily limit. It stops someone signing a stranger up again and again. Plus-tags and Gmail dots count as one address, and days are counted in UTC.

Parameters

Parameter

Description

$limit

int

Sends per address per day: 3.

Returns

int The limit, cast to an integer.

Example

Test with one address on staging

PHP

add_filter( 'modal_kit_pro_address_daily_limit', function ( $limit ) {
  return 'production' === wp_get_environment_type() ? $limit : 1000;
} );

Good to know

Over the limit, the visitor sees the form’s usual success but nothing is sent or logged, so the form can’t be used to find out which addresses have signed up.

Applied in modal-kit-pro/includes/Submissions.php.

Need a hook that isn’t here?