BP_REST_Group_Invites_Endpoint::fetch_single_invite( int $invite_id )

Helper function to fetch a single group invite.

Description

Parameters

$invite_id

(int) (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

	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.