bp_groups_clear_user_group_cache_on_invitation_save( $invitation )

Clear caches on saving a group invitation or request.

Description

The save action is called when inserting a new record or using the save() method to update an existing record.

Parameters

(Required) object $invitation Characteristics of the invitation just saved.

Source

File: bp-groups/bp-groups-cache.php

function bp_groups_clear_user_group_cache_on_invitation_save( BP_Invitation $invitation ) {
	if ( sanitize_key( 'BP_Groups_Invitation_Manager' ) !== $invitation->class ) {
		return;
	}

	wp_cache_delete( $invitation->id, 'bp_groups_invitations_as_memberships' );
}

Changelog

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