LLMS_AJAX_Handler::bulk_enroll_students( $request )
Add or remove a student from a course or membership
Description Description
Source Source
File: includes/class.llms.ajax.handler.php
public static function bulk_enroll_students( $request ) { if ( empty( $request['post_id'] ) || empty( $request['student_ids'] ) || ! is_array( $request['student_ids'] ) ) { return new WP_Error( 400, __( 'Missing required parameters', 'lifterlms' ) ); } $post_id = intval( $request['post_id'] ); foreach ( $request['student_ids'] as $id ) { llms_enroll_student( intval( $id ), $post_id, 'admin_' . get_current_user_id() ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: