This tutorial is show us how you can control the end date for all the users purchasing the course.
Note this tutorial only valid for course purchases via WooCommerce.
Add this code in Child theme functions.php or WPLMS Customizer – wplms_customizer.php
1. Add control in admin panel for Course end date.
add_filter('wplms_course_metabox','wplms_set_course_end_date'); function wplms_set_course_end_date($metabox){ $metabox[]=array( // Text Input 'label' => __('Course End Date','vibe-customtypes'), // <label> 'desc' => __('Date from which Course Ends','vibe-customtypes'), // description 'id' => 'vibe_end_date', // field id and name 'type' => 'date', // type of field ); return $metabox; }
Result :
2. Set Course expiry to set date :