Okay
  Public Ticket #3959277
How to display prerequisite courses in the app course details?
Open

Comments

  •  1
    Isigma started the conversation

    Currently the course details (course page) in the app interface is showing the warning about the prerequisites, but not the list of prerequisites. What's the way to add that element to the page layout? I tried editing course card in VibeBP layouts, but it makes no change. Editing the actual course details page leads to the app page.

  •  390
    Ripul replied

    Thank you, i have now added this.

    you can use this snippet to add this in the Elementor Course Data widget : 

     

    add_filter('wplms_course_info_display_options',function($args){
                $args['prerequisites'] = 'Course pre-requisites';
                return $args;
            });
    
            add_action('wplms_course_info_content',function($id,$info){
                if($info == 'prerequisites'){
                    $course_ids = get_post_meta($id,'vibe_pre_course',true);
                    if(!empty($course_ids)){
                        for($i=0;$i<$course_ids;$i++){
                            $course_id = $course_ids[i];
                            echo ''.get_the_title($course_id).'';
                        }
                    }
                }
            },10,2);