The wp_logout()
function is pluggable. You should be able to write your own version and “overload” the Core function:
function wp_logout() {
$lid = get_current_user_id();
wp_destroy_current_session();
wp_clear_auth_cookie();
do_action( 'wp_logout' );
/**
* Fires after a user is logged-out.
*
* @since 1.5.0
*/
if (2 == $lid) {
wp_redirect(home_url("/redirectTo"));
exit;
}
}