BuddyPress has no meta for invitations, so LH Membership adds it: per-invitation data such as when a reminder was sent, kept with the invitation and deleted with it.
BP_Invitation_Manager::get_table_name() plus _invitemeta, so lhero_bp_invitations_invitemeta on LocalHero. It is in BuddyPress’s meta-table shape: id (primary key), invite_id (indexed), meta_key (indexed) and meta_value.bp_core_get_table_prefix(). On LocalHero, LH BuddyPress Multi Network makes that prefix each site’s own, while the invitations table is kept network-wide, so the prefix would give each site its own meta table. Before 2.120.1 it did: a site’s own requests (its reminder runs among them) wrote to a per-site table, while requests reaching the site with site_id read the network one.invite ($wpdb->invitemeta), wrapped in BuddyPress’s bp_filter_metaid_column_name exactly as BuddyPress’s groupmeta functions are.invite_meta group, registered as a global cache group, so meta reads the same from any site, including through the main connector with site_id.Static methods on LH_Membership_organisation_team_invitations_class, with the same arguments as WordPress’s own meta functions:
add_invite_meta( $invite_id, $meta_key, $meta_value, $unique = false )get_invite_meta( $invite_id, $meta_key = '', $single = true ): an empty key returns all of the invitation’s meta.update_invite_meta( $invite_id, $meta_key, $meta_value, $prev_value = '' )delete_invite_meta( $invite_id, $meta_key = '', $meta_value = '' ): an empty key deletes all of the invitation’s meta.They are deliberately not named bp_invitations_*_invitemeta(), so they cannot clash with BuddyBoss’s functions of that name or with any BuddyPress adds later.
The table is created with dbDelta if it is missing, once per network, keyed on the class’s schema_version() (recorded in the network option lh_membership-invitemeta_schema_version), never on the plugin version. A table that already exists with the same schema is used as it is: on LocalHero it was created earlier by BuddyBoss. If BuddyBoss is active, its own invitation meta functions are left alone; they share the table, so there is no conflict.
lh_membership_return_invite_meta_table_name ( string $table ): the table.lh_membership_return_invite_meta_type ( string $type ): the meta type. WordPress derives the $wpdb property, the invite_id column and the cache group from it, so change it only together with the table.The code is in includes/lh-membership-organisation-team-invitations-class.php. (Since 2.113.0; table named from BuddyPress’s invitations table since 2.120.1.)