Mycred: Non Login Problem – Insufficient Error

Home Forums Legacy Support Support queries Other issues Mycred: Non Login Problem – Insufficient Error

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #37280
    skillomo
    Participant
    I was setup wplms with myCred means that user can take the course using Mycred Point. The problem is if user go to course detail and click "Take This Course" without login, then it will be error "insufficient" How to setup, if user not login then click "Take This Course", there will be a display error Please Login to Continue. or is it possible to redirect to register page if user not login and click it? Thanks
    #37486
    H.K. Latiyan
    Participant
    Please try adding this code in your wplms-customizer.php file present in your wplms customizer plugin. add_filter('wplms_take_course_button_html','custom_non_loggedin_user_redirect',10,2); function custom_non_loggedin_user_redirect($html,$course_id){   if(!is_user_logged_in()){     $extra ='';          $register_page='http://localhost/wplms/register';     return '<a href="'.$register_page.'" class="course_button full button">'.apply_filters('wplms_take_this_course_button_label',__('TAKE THIS COURSE','vibe'),$course_id).apply_filters('wplms_course_button_extra',$extra,$course_id).'</a>';    }   return $html; }   NOTE: Please change the $register_page link to your register page link.
    #38248
    skillomo
    Participant
    Thanks. it works
    #38336
    H.K. Latiyan
    Participant
    Thanks for confirming. So marking the topic as resolved and closing the topic.
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Mycred: Non Login Problem – Insufficient Error’ is closed to new replies.