function custom_remove_user( $user_id ) { //code... } add_action( 'delete_user', 'custom_remove_user', 10 );