Automattic\WooCommerce\Internal\PushNotifications\Services
UserDataCleanupService::handle_remove_user_from_blog
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.
Метод класса: UserDataCleanupService{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
$UserDataCleanupService = new UserDataCleanupService(); $UserDataCleanupService->handle_remove_user_from_blog( $user_id ): void;
- $user_id(int) (обязательный)
- The ID of the user being removed from the site.
Список изменений
| С версии 11.2.0 | Введена. |
Код UserDataCleanupService::handle_remove_user_from_blog() UserDataCleanupService::handle remove user from blog WC 11.2.2
public function handle_remove_user_from_blog( int $user_id ): void {
$this->delete_data_for_user( $user_id );
}