Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Student_Bulk_Enroll::enroll_users_in_product()
Enrolls multiple users into a product
Source Source
File: includes/admin/class.llms.student.bulk.enroll.php
private function enroll_users_in_product() { // Get user information from user ids. $users = $this->get_users( $this->user_ids ); // Bail if for some reason, no users are found (because they were deleted in the bg?). if ( empty( $users ) ) { $message = sprintf( __( 'No such users found. Cannot enroll into <em>%s</em>.', 'lifterlms' ), $this->product_title ); $this->generate_notice( 'error', $message ); return; } // Create manual enrollment trigger. $trigger = 'admin_' . get_current_user_id(); foreach ( $users as $user ) { $this->enroll( $user, $trigger ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.20.0 | Introduced. |