Code must be Added to child theme - functions.php file or wp- admin - plugins - editor - wplms customizer - wplms_customizer.php
STEP 1 : Add label field in Course Settings :
add_filter('wplms_course_metabox','wplms_take_this_course_label'); function wplms_take_this_course_label($fields){ $fields[]=array( // Text Input 'label' => 'Set Take this course label', // <label> 'desc' => 'Set label', 'id' => 'vibe_take_this_course', // field id and name 'type' => 'text', // type of field 'std' => '' ); return $fields; }
Result :
STEP 2 : Add label
add_filter('wplms_take_this_course_button_label','wplms_course_take_course_button',10,2); function wplms_course_take_course_button($label,$course_id){ $new_label = get_post_meta($course_id,'vibe_take_this_course',true); if(isset($new_label) && $new_label) $label = $new_label; return $label; }