Your team has been amazing (I purchased the plugin, but then we didn’t end up using it so they sent me a refund. then i reached out with this issue and they have been amazingly helpful). I’ll post both the code I use to show all of my “caps” (in all of WP, not just UM) and the code they sent me to flush out the leftover roles/caps that the deactivate/delete didn’t catch.
The first 3 lines (all of this is in my child theme functions.php) will show you all of the roles and capabilities on your site.
The next chunk is what the great folks at UM sent me that finally removed all of the leftovers from the plugin.
It should be noted that I sent them the printout from the 3 lines of code FIRST and then they sent me the below code. My assumption is that others would be able to run the first 3 lines and then alter the code below to fit their needs.
Lastly, the add_action should only be run once. Then just remove it.
// global $wp_roles;
// $roles = $wp_roles->roles;
// echo '<pre>' . print_r( $roles, true ) . '</pre>';
// function um_custom_echo_roles() {
// global $wp_roles;
// foreach ( $wp_roles->roles as $roleID => &$role_data ) {
// unset( $role_data['_um_can_access_wpadmin'] );
// unset( $role_data['_um_can_not_see_adminbar'] );
// unset( $role_data['_um_can_edit_everyone'] );
// unset( $role_data['_um_can_delete_everyone'] );
// unset( $role_data['_um_can_edit_profile'] );
// unset( $role_data['_um_can_delete_profile'] );
// unset( $role_data['_um_default_homepage'] );
// unset( $role_data['_um_after_login'] );
// unset( $role_data['_um_after_logout'] );
// unset( $role_data['_um_can_view_all'] );
// unset( $role_data['_um_can_make_private_profile'] );
// unset( $role_data['_um_can_access_private_profile'] );
// unset( $role_data['_um_status'] );
// unset( $role_data['_um_auto_approve_act'] );
// if ( ! empty( $role_meta ) ) {
// $wp_roles->roles[ $roleID ] = array_merge( $role_data, $role_meta );
// }
// }
// update_option( $wp_roles->role_key, $wp_roles->roles );
// $um_instructors = get_users( array(
// 'role__in' => 'um_instructor',
// ) );
// if ( ! empty( $um_instructors ) ) {
// foreach ( $um_instructors as $instructor ) {
// $instructor->remove_role( 'um_instructor' );
// }
// }
// }
// add_action( 'init', 'um_custom_echo_roles' );