Remove enroll button for offline courses

Home Forums Legacy Support Support queries How-to & Troubleshooting Remove enroll button for offline courses

Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #137577
    nursesed.net
    Participant
    Hi, I need to remove the Enroll button for offline courses. Is there code I can use to do that? Can I replace the Enroll button with a shortcode for a plugin? Thank you!  
    #137602
    H.K. Latiyan
    Participant
    Hi, You can hide the course button after the user is enrolled in the course. You can also link that button to an external link i.e. when the user click on the enrol button then she is redirected to a custom link set by you in the setting.
    #137712
    nursesed.net
    Participant
    Hi Latiyan, Thank you for the quick response. I need to remove the button all together, because I'm using a different scheduling system for our offline classes. We are required to use that system for our offline classes - and it's through a plugin with a shortcode. It's not just a link. Here's a screenshot: I really need to either remove that section, or do something entirely different with the button. Can I add an image instead of the button? Can I change only the offline button text to say something like Download a Study Guide"? I still need the button to say Enroll for the online classes.  
    #138617
    H.K. Latiyan
    Participant
    Hi, Yes you can change the label, add the below code in your wplms-customizer.php file present in your wplms customizer plugin: add_filter('wplms_take_this_course_button_label',function($credits,$course_id){   $check = get_post_meta($course_id,'vibe_course_offline',true);     if( !empty($check) && $check == 'S' ){       $label = 'Download a Study Guide';       return '<strong><span class="coming_soon">'.$label.'</span></strong>';     }   return $credits; },99,2);   Change the text in the code according to your requirements.
    #138879
    nursesed.net
    Participant
    I only need to change the label for offline courses. Is the code above specifically for that, or it will apply the label to all LMS courses?  
    #138925
    H.K. Latiyan
    Participant
    Hi, Yes, the above code is only for offline courses.
    #139003
    nursesed.net
    Participant
    Thank you! I inserted the code in the wplms-customizer.php file, but the button says "Private Course" Do I have to attach a product for this to become effective? I really didn't want to create products for offline courses.
    #139025
    H.K. Latiyan
    Participant
    Hi, The above code is not for private courses. If you want it to work for courses which are private and offline courses then add the below code: add_filter('wplms_private_course_button_label',function($credits,$course_id){   $check = get_post_meta($course_id,'vibe_course_offline',true);     if( !empty($check) && $check == 'S' ){       $label = 'Download a Study Guide';       return '<strong><span class="offline">'.$label.'</span></strong>';     }   return $credits; },99,2);
    #139263
    nursesed.net
    Participant
    Thank you!  I was able to change the buttons label on these classes with your code.
Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Remove enroll button for offline courses’ is closed to new replies.