Set Take this course label not working

Home Forums Legacy Support Support queries How-to & Troubleshooting Set Take this course label not working

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #105749
    dfarjoun
    Spectator
    Hi, I've inserted the code to change the title of the "Take this course" button. It appears on the back end, but doesn't matter the text I insert there, nothing changes on the front end. It was working before last update.
    #105750
    dfarjoun
    Spectator
    This reply has been marked as private.
    #105752
    dfarjoun
    Spectator
    I'm sorry. It is working. I noticed it changes the title of the button because I'm subscribed to the PMPro Membership. I can't even remove myself from the course. But it appears the backend title when I access via private browsing without logging in. Is it possible to keep the backend title even after I'm logged in? Thanks, Daniel
    #105778
    H.K. Latiyan
    Participant
    This reply has been marked as private.
    #107689
    dfarjoun
    Spectator
    This is the code: add_filter('wplms_course_credits','customwplms_course_credits_array7',10,2); function customwplms_course_credits_array7($credits_html,$course_id){   if(is_user_logged_in()) { $user_id = get_current_user_id(); $course_user = bp_course_get_user_course_status($user_id,$course_id); if(wplms_user_course_active_check($user_id,$course_id)){ switch($course_user){ case 1: $course_status =  __('COMPRA EFETUADA','vibe'); break; case 2: $course_status = __('COMPRA EFETUADA','vibe'); break; case 3: $course_status = __('COURSE UNDER EVALUATION','vibe'); break; case 4: $finished_course_access = vibe_get_option('finished_course_access'); if(isset($finished_course_access) && $finished_course_access){ $course_status = __('FINISHED COURSE','vibe');   }else{ $course_status = __('COURSE FINISHED','vibe'); } break; default: $course_status =  __('COURSE ENABLED','vibe').'<span>'.__('CONTACT ADMIN TO ENABLE','vibe'); break; } $credits_html=$course_status; }     }   return $credits_html;   }
    #107820
    H.K. Latiyan
    Participant
    The code you shared is for replacing the course price with the course status of the user. This code is not responsible for the label of take this course button. ----------------- The take this course is only shown if the user is not enrolled in the course, so if you are enrolled in the course then you won't see the same label.
    #108588
    Nick
    Participant
    I have the same issue - I have changed wording for "take this course" - it used to work - now it does not anymore.
    #108704
    H.K. Latiyan
    Participant
    I am not sure why are you using some code to change the text of take this course button. You should ideally translate the text using the loco translate plugin, refer the tutorial: https://vibethemes.com/documentation/wplms/knowledge-base/translate-using-loco-translate-plugin/
    #115452
    dfarjoun
    Spectator
    I'm changing because not all "courses" are courses. One of them I want to call "take the quizzes" or "read the book" instead of take the course.
    #115519
    H.K. Latiyan
    Participant
    Ok.. But as I mentioned above the code you shared here is not responsible for changing the label of take this course button. Please share the correct code you used for this to look into it.
Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Set Take this course label not working’ is closed to new replies.