Skip to content

Commit c59fbc3

Browse files
committed
added delete course enrollment
1 parent 49f0c5a commit c59fbc3

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php // Don't copy this line!
2+
/**
3+
* llms_delete_course_enrollment.php
4+
*
5+
* @since 2023-10-20
6+
*/
7+
/**
8+
* Delete course enrollment of a student.
9+
*
10+
* @param int $student_id WP User ID
11+
* @param int $course_id WP Post ID of the Course
12+
* @return void
13+
*/
14+
function llms_delete_course_enrollment() {
15+
$student_id = 89;
16+
$course_id = 196;
17+
$student = new LLMS_Student( $student_id );
18+
$student->delete_enrollment( $course_id );
19+
}
20+
add_action( 'init', 'llms_delete_course_enrollment', 10 );

0 commit comments

Comments
 (0)