Hello,
Try adding the given code in your wplms-customizer.php file in wplms customizer plugin :
add_filter('bp_course_wplms_filters','wplms_hide_draft_courses',99);
function wplms_hide_draft_courses($query_args){
if(!current_user_can('manage_options')){
$query_args['post_status'] = array('publish');
}
return $query_args;
}
Please note that only admins will see the courses on the all courses page if the above code added .Also, you have to add the code at the end of the wplms-customizer.php file before " ?> " .