Hi I am looking for a way to hide empty group types. So I am using <?php $group_types = bp_groups_get_group_types( [], 'object' ); ?> to output all group types but the majority of those types dont actually have any groups attributed to them yet.
This function returns all the registered group types so you have to write your own for this. https://wordpress.org/plugins/bp-create-group-type/ this plugin have option to let you choose which group type you want to show/hide.