How to hide “Private” course button

Follow below steps :

1. Course is not connected to any Product or Membership or points. This will force the button to display “Private”.

2. Add below code in Child theme functions.php (WP Admin -> Appearance -> Editor -> WPLMS Child -> functions.php ) file or WPLMS customizer / wplms_customizer.php file ( WP Admin -> Plugins -> Editor -> wplms customizer -> wplms_customizer.php )

3. Add this code :

add_action('wplms_the_course_button','wplms_custom_hide_private_button',10,2);
function wplms_custom_hide_private_button($course_id,$user_id){
    if(!wplms_user_course_check($user_id,$course_id)){
        echo '<style>.course_button{display:none;}</style>';
    }
}