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
- Everyone on the site with an open organisation invitation who is not a member (holds no member type), one entry per person. Spam-flagged accounts are left out.
- Reminder 1 on day 7 and reminder 2 on day 21, counted from the person’s earliest open invitation (its
date_modified, which nothing here changes). Then no more. - One email per person, however many invitations they have; it names all their teams.
- Someone already past day 21 when reminders start on a site gets only reminder 2. Reminder 2 waits at least 7 days after a late reminder 1.
- Reminders stop by themselves once the person accepts or declines the terms (their invitations close) or becomes a member.
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):
- How many people have open invitations, how many are due, sent, failed, held over to the next run by the batch size, not yet due, or done; whether reminders were on; whether the invitation manager was available; and which runner ran it (
action_scheduler,wp_cronorrequest), with the action ID. - Each send attempted, with the person, the stage and, for a failure, why:
bp_send_email()missing, the reminder emails missing, abp_send_emailerror code and message, awp_mailfailure, orbp_send_emailreturning false. - The last run is kept in the site option
lh_membership-org_invite_reminders_last_runand returned aslast_runbylist-open-invitations. On Action Scheduler, a one-line summary with the first failure is also written to the action’s log, for example “Reminders ran: 34 open, 27 due, 27 sent, 0 failed, 0 deferred, 7 not yet due, 0 done.”
The emails
- Two BuddyPress emails, edited per site under Emails:
lh-membership-org-invite-reminder-teamfor someone with a team andlh-membership-org-invite-reminderfor someone without (BuddyPress tokens have no conditionals). Default subject: Finish your membership application. - The default wording thanks them for applying, says they will join their team when they become a member, and links to the registration page to finish. It never welcomes them or implies they are in the team.
- Tokens:
{{site.name}},{{recipient.name}},{{lh.register.url}}(the site’s registration page) and{{lh.team.name}}(several teams read A, B and C). - Installed on a site if missing, once per site, keyed on the emails’ own schema version (site option
lh_membership-org_invite_reminder_emails_version): when an administrator visits wp-admin, or before the first send. BuddyPress’s reinstall-emails tool restores them too. - Sent from PPT Transactions at transactions@ the site’s email domain, with Reply-To info@. BuddyPress passes no headers when it sends through
wp_mail()(as on LocalHero, where LH Email queues and logs it, from cron and Action Scheduler runs too since LH Email 3.18.0), so the headers are added by awp_mailfilter attached only around the reminder send.
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
lh_membership_return_org_invite_reminders_enabled: return false to switch reminders off for a site.lh_membership_return_org_invite_reminder_days(stage => days, default 1 => 7, 2 => 21),_gap_days(7),_batch_size(50),_interval(seconds between runs on Action Scheduler, default one hour) and_recurrence(the WP-Cron fallback’s schedule, default hourly).lh_membership_org_invite_reminders_hook: the job’s hook name.lh_membership_return_org_invite_reminder_from_name,_from_address,_reply_to_address,_register_url,_email_schemas(the default emails), andlh_membership_org_invite_reminder_tokens.lh_membership_return_open_invitations_report_capability(defaultadd_users).
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.)

