Send mail notification to admin for update in lms content

Add the given code in your wplms-customizer.php file at the end before ” ?> ” in wplms customizer plugin . function wplms_updated_send_email( $post_id ) { // If this is just a revision, don’t send the email. if ( wp_is_post_revision( $post_id ) ) return; // post type quiz ,question,assignment,unit if( get_post_type( […]

free course take this course button issue in modern theme(fix)

Please add the given code in your wplms-customizer.php file in your wplms customizer plugin : add_action(‘template_redirect’,’subscribe_free_course_fix_modern’,999); function subscribe_free_course_fix_modern(){     global $post;     if(!is_singular(‘course’))         return;     if(isset($_GET[‘subscribe’])){         $free = get_post_meta($post->ID,’vibe_course_free’,true);         if(vibe_validate($free)){             $user_id = get_current_user_id();             bp_course_add_user_to_course($user_id,$post->ID);         }     } }

Adding buddypress xprofile fields in modern theme ajax registration

In this tip we will add Gender and Location fileds in the ajax registration form : Please refer the code and add it to the wplms-customizer.php file at the end and before “?>” in wplms customizer plugin : add_filter(‘vibe_projects_registration_fields’,’wplms_modern_custom_registration_field’); function wplms_modern_custom_registration_field($fields){ $fields[] = array( ‘label’=> __(‘Gender’,’wplms_modern’), ‘placeholder’=> __(‘Enter Name’,’wplms_modern’), ‘id’=> […]

Bp social connect and certificate validation widget issue (Fix)

This issue is in the theme . You will need ftp or cpanel to fix this . 1. Please goto wp-content/themes/wplms/includes/widgets/custom_bp_widgets.php file : find  ‘  name=”code”  ‘ in that file .It is on the line number 290 and change it to : name=”certificate_code” refer : http://prntscr.com/9fybu8 2. Now goto the wp-content/themes/wplms/certificate.php […]

Show related courses in single course page

Please add the given code in your wplms-customizer.php file at the end and before “?>” in wplms customizer plugin : add_action(‘bp_after_course_body’,’wplms_modern_course_front_default’); function wplms_modern_course_front_default(){ ?> <div class=”related_courses”> <h2><?php _e(‘Related Courses’,’wplms_modern’);?></h2> <?php $terms = wp_get_post_terms(get_the_ID(),’course-cat’); $categories = array(); if(!empty($terms)){ foreach($terms as $term) $categories[] = $term->term_id; } $args = apply_filters(‘wplms_moern_related_courses’,array( ‘post_type’ => ‘course’, […]

Restricting non-logged in user to see the free unit

Please add the given code in your wplms-customizer.php file in wplms customizer plugin  : add_filter(‘bp_course_get_full_course_curriculum’,’wplms_restrict_free_user_access’,9,1); function wplms_restrict_free_user_access($args){ if(!is_user_logged_in()){ foreach($args as $k => $arg){ $args[$k][‘link’] = ”; } } return $args; }  

Certificate instructor custom field shortcode

Add the given code in your wplms-customizer.php file in wplms-customizer plugin : if (!function_exists(‘vibe_certificate_inst_field’)) { function vibe_certificate_inst_field( $atts, $content = null ) { extract(shortcode_atts(array( ‘field’ => ”, ), $atts)); $cid=$_GET[‘c’]; $inst_id=get_post_field(‘post_author’,$cid); if(isset($inst_id) && is_numeric($inst_id) && isset($field) && strlen($field)>3) return bp_get_profile_field_data( ‘field=’.$field.’&user_id=’ .$inst_id); else return ‘[certificate_instructor_field]’; } add_shortcode(‘certificate_instructor_field’, ‘vibe_certificate_inst_field’); } ANd […]

Front end not working when woocommerce deactivated (quick fix)

Please add the given code in your wplms-customizer.php file in your wplms customizer plugin  : add_filter(‘wplms_course_creation_tabs’,’wplms_woocommerce_front_end_check’); function wplms_woocommerce_front_end_check($tabs){ if(in_array(‘woocommerce/woocommerce.php’, apply_filters(‘active_plugins’, get_option(‘active_plugins’)))){ }else{ // Not found unset($tabs[‘course_pricing’][‘fields’][2]); } return $tabs; }