bp_groups_clear_user_group_cache_on_invitation_save( $invitation )

Clear caches on saving a group invitation or request.


Description Description

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


Top ↑

Parameters Parameters

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


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

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.