-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49f0c5a
commit c59fbc3
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ); |