Show Unit attachments in Curriculum display

In case you wish to show unit attachment in Unit

 

add_filter(‘wplms_curriculum_course_lesson’,function($title,$unit_id){

   $attachments = get_post_meta($unit_id,’vibe_unit_attachments’,true);

   if(!empty($attachments)){

        foreach($attachments as $attachment_id){

            $title .=’&nbsp;&nbsp;<a class=”has-primary-color” href=”‘.wp_get_attachment_url($attachment_id).'” target=”_blank”>Preview</a>&nbsp;’;

        }

    }

   return  $title;

},10,2);

refer how to add code customisations : link