BP_REST_Group_Invites_Endpoint::fetch_single_invite( int $invite_id )

Helper function to fetch a single group invite.


Parameters Parameters

$invite_id

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


Top ↑

Return Return

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


Source 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;
		}
	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.