BP_Groups_Invitation_Manager::run_send_action( $invitation )
This is where custom actions are added to run when notifications of an invitation or request need to be generated & sent.
Description
Parameters
- $id
-
(Required) The ID of the invitation to mark as sent.
Return
(bool) True on success, false on failure.
Source
File: bp-groups/classes/class-bp-groups-invitation-manager.php
public function run_send_action( BP_Invitation $invitation ) { // Notify group admins of the pending request if ( 'request' === $invitation->type ) { $admins = groups_get_group_admins( $invitation->item_id ); foreach ( $admins as $admin ) { groups_notification_new_membership_request( $invitation->user_id, $admin->user_id, $invitation->item_id, $invitation->id ); } return true; // Notify the invitee of the invitation. } else { $group = groups_get_group( $invitation->item_id ); groups_notification_group_invites( $group, $invitation->user_id, $invitation->inviter_id ); return true; } }
Changelog
Version | Description |
---|---|
BuddyBoss 1.3.5 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.