Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › Set Take this course label not working
- This topic has 9 replies, 3 voices, and was last updated 6 years, 11 months ago by H.K. Latiyan.
Viewing 10 posts - 1 through 10 (of 10 total)
-
AuthorPosts
-
April 8, 2017 at 7:38 am #105749dfarjounSpectatorHi, 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.April 8, 2017 at 7:52 am #105750dfarjounSpectatorThis reply has been marked as private.April 8, 2017 at 8:00 am #105752dfarjounSpectatorI'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, DanielApril 8, 2017 at 9:57 am #105778H.K. LatiyanParticipantThis reply has been marked as private.April 20, 2017 at 8:16 am #107689dfarjounSpectatorThis 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; }April 20, 2017 at 2:18 pm #107820H.K. LatiyanParticipantThe 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.April 24, 2017 at 7:31 pm #108588NickParticipantI have the same issue - I have changed wording for "take this course" - it used to work - now it does not anymore.April 25, 2017 at 12:17 pm #108704H.K. LatiyanParticipantI 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/June 3, 2017 at 10:22 pm #115452dfarjounSpectatorI'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.June 5, 2017 at 11:45 am #115519H.K. LatiyanParticipantOk.. 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.
-
AuthorPosts
Viewing 10 posts - 1 through 10 (of 10 total)
- The topic ‘Set Take this course label not working’ is closed to new replies.