add_filter('wplms_course_details_widget',function($html,$course_id){
$hh = '';
$batches = wplms_get_course_batches($course_id);
if(!empty($batches)){
foreach ($batches as $key => $b) {
if(groups_is_user_member(get_current_user_id(),$b)){
$hh = '<a href=".'bp_get_group_permalink(groups_get_group($b)).'">Klasen</a>';
$html['batch'] = $hh;
break;
}
}
}
return $html;
},10,2);
try this code or give credentials to check this on your site