Automattic\WooCommerce\Internal\PushNotifications\Services

UserDataCleanupService::handle_remove_user_from_blog │ public │ WC 11.2.0

Handles the remove_user_from_blog hook.

WordPress fires this inside switch_to_blog(), so the site-scoped reads and writes below already target the site the user is leaving.

Method of the class: UserDataCleanupService{}

No Hooks.

Returns

void. Nothing (null).

Usage

$UserDataCleanupService = new UserDataCleanupService();
$UserDataCleanupService->handle_remove_user_from_blog( $user_id ): void;
$user_id(int) (required)
The ID of the user being removed from the site.

Changelog

Since 11.2.0 Introduced.

UserDataCleanupService::handle_remove_user_from_blog() code WC 11.3.0

public function handle_remove_user_from_blog( int $user_id ): void {
	$this->delete_data_for_user( $user_id );
}