This tip will hide the forum and group link for the students who have not purchased the course or the course has been expired for them .
It will also hide the group and forum link for the non logged in user .
Please add the given code in your wplms-customizer.php file in wplms customizer plugin :
add_action('wp_footer','hide_group_forum'); function hide_group_forum(){ global $post; if(!is_user_logged_in() || (!wplms_user_course_active_check(get_current_user_id(),$post->ID) && !current_user_can('edit_posts')) ){ echo ' <style> li#forum { display: none; } li#group { display: none; } </style>'; } }