How do you stop people viewing the course curriculum before sign up for the course

Ok this is possible, there are two ways to tackle this

1. Hide the Curriculum button for non-logged in members
2. Show an error message for users trying to check out curriculum

3. 1+2

The safest and recommended way is 3. So here is how you can achieve this :

1. Go to WP Admin -> Plugins -> Editor -> WPLMS Customizer -> customizer_class.php

2. Add the following code in __construct function :

PHP Code:
add_filter('wplms_course_nav_menu',array($this,'custom_course_nav_menu'));
add_action('bp_before_course_body',array($this,'reset_action_curriculum'));

3. Add the following function in class :

PHP Code:
function custom_course_nav_menu($menu){
   if(!is_user_logged_in())
      unset($menu['curriculum']);
 
return $menu;
}
 
function reset_action_curriculum(){
  if(isset($_GET['action'])){
if( !is_user_logged_in() && $_GET['action'] == 'curriculum')
 wp_die('Curriculum can not be accessed without logging in.');
}
 
}