BP_REST_Group_Membership_Request_Endpoint::fetch_single_membership_request( int $request_id )

Helper function to fetch a single group invite.

Description

Parameters

$request_id

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

Return

(BP_Invitation|bool) $group_request Membership request if found, false otherwise.

Source

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

	public function fetch_single_membership_request( $request_id = 0 ) {
		$group_requests = groups_get_requests( array( 'id' => $request_id ) );
		if ( $group_requests ) {
			return current( $group_requests );
		} 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.