Skip to content

Instantly share code, notes, and snippets.

View ELPTFASSN's full-sized avatar
🎯
Focusing

El Otro yo del MI original ELPTFASSN

🎯
Focusing
  • San Miguel de Tucuman
View GitHub Profile
@sekanderb
sekanderb / do_enrol.php
Last active October 4, 2023 04:07
Enroll students programmatically in Tutor LMS. Documentation link- https://docs.themeum.com/tutor-lms/developers/programmatically-enroll-students/
public function do_enroll($course_id = 0, $order_id = 0, $user_id = 0){
if ( ! $course_id){
return false;
}
do_action('tutor_before_enroll', $course_id);
$user_id = $this->get_user_id($user_id);
$title = __('Course Enrolled', 'tutor')." – ".date_i18n(get_option('date_format')) .' @ '.date_i18n(get_option('time_format') ) ;