Reminders for unfinished applications

People who start applying for membership and stop are followed up by email. An open organisation invitation (see Organisation invitations) means the person has not yet accepted or declined the terms, so it marks an unfinished application.

Who is reminded, and when

On by default

On on every site since 2.118.0. There is no setting: a site that should not send them returns false from lh_membership_return_org_invite_reminders_enabled ( bool $enabled, int $blog_id ), evaluated in the site’s own request. While it is true the site has an hourly job, lh_membership_org_invite_reminders, run through the plugin’s queue (see Background jobs): a recurring Action Scheduler action in the lh-membership group where the site has Action Scheduler (Princes Park Touch does), otherwise an hourly WP-Cron event. The job is created or repaired on init and removed when the filter goes false. A run handles at most 50 people per site and takes a lock so two runs cannot overlap.

On Action Scheduler each run is listed under Tools > Scheduled Actions and can be run by hand there, or over MCP with lh-mcp-developer-abilities/run-scheduled-action (hook lh_membership_org_invite_reminders, with site_id), which runs it in the site’s own request.

Run reports

Every run records what it did, including runs that stop early (reminders off, or another run holding the lock):

The emails

Tracking

Each reminder sent is recorded on every invitation it covered, in invitation meta (see Invitation meta): lh_membership-reminder_1_sent and lh_membership-reminder_2_sent, UTC datetimes. lh_membership_org_team_invite_reminded ( int $invite_id, int $user_id, int $group_id, int $stage ) fires for each, for LH Audit Trail.

Users > Open Invitations

A screen listing the same people, one row per person: person (linked), email, teams, earliest invite date, days open, the date of each reminder sent, and the next reminder due or Done. Sortable by person, invite date, days open and next reminder; filterable by team and reminder stage. On a site where reminders are off it shows when each would be sent. Requires add_users, as Users > Pending Approval does. The list-open-invitations ability returns the same data, plus the last run’s report, over MCP (see Abilities).

Filters

The code is in includes/lh-membership-org-invite-reminders-class.php (reminders, emails and run reports), includes/lh-membership-org-invite-reminders-report-class.php and includes/lh-membership-org-invite-reminders-list-table.php (the screen). (Since 2.114.0; emails since 2.115.0; screen since 2.116.0; ability since 2.117.0; on by default since 2.118.0; on Action Scheduler since 2.119.0; run reports since 2.120.0.)