Skip to content

Commit

Permalink
added delete course enrollment
Browse files Browse the repository at this point in the history
  • Loading branch information
actuallyakash committed Oct 20, 2023
1 parent 49f0c5a commit c59fbc3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lifterlms/llms_delete_course_enrollment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php // Don't copy this line!
/**
* llms_delete_course_enrollment.php
*
* @since 2023-10-20
*/
/**
* Delete course enrollment of a student.
*
* @param int $student_id WP User ID
* @param int $course_id WP Post ID of the Course
* @return void
*/
function llms_delete_course_enrollment() {
$student_id = 89;
$course_id = 196;
$student = new LLMS_Student( $student_id );
$student->delete_enrollment( $course_id );
}
add_action( 'init', 'llms_delete_course_enrollment', 10 );

0 comments on commit c59fbc3

Please sign in to comment.