BP_REST_Group_Invites_Endpoint::fetch_single_invite( int $invite_id )

Helper function to fetch a single group invite.

Description

Parameters

$invite_id

(Required) The ID of the invitation you wish to fetch.

Return

(BP_Invitation|bool) $invite Invitation if found, false otherwise.

Source

File: bp-groups/classes/class-bp-rest-group-invites-endpoint.php

1004
1005
1006
1007
1008
1009
1010
1011
public function fetch_single_invite( $invite_id = 0 ) {
    $invites = groups_get_invites( array( 'id' => $invite_id ) );
    if ( $invites ) {
        return current( $invites );
    } else {
        return false;
    }
}

Changelog

Changelog
Version Description
0.1.0 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.