wo_logout() code example
Example: wordpress programmatically logout
wp_destroy_current_session();
wp_clear_auth_cookie();
wp_set_current_user( 0 );
wp_destroy_current_session();
wp_clear_auth_cookie();
wp_set_current_user( 0 );