LLMS_Processor_Membership_Bulk_Enroll::schedule_enrollment( int $membership_id, int $course_id )
Schedule bulk enrollment This will schedule an event that will setup the queue of items for the background process
Parameters Parameters
- $membership_id
-
(int) (Required) WP Post ID of the membership
- $course_id
-
(int) (Required) WP Post ID of the course to enroll members into
Return Return
(void)
Source Source
File: includes/processors/class.llms.processor.membership.bulk.enroll.php
public function schedule_enrollment( $membership_id, $course_id ) { $this->log( sprintf( 'membership bulk enrollment triggered for membership %1$d into course %2$d', $membership_id, $course_id ) ); $args = array( $membership_id, $course_id ); if ( ! wp_next_scheduled( $this->schedule_hook, $args ) ) { wp_schedule_single_event( time(), $this->schedule_hook, $args ); $this->log( sprintf( 'membership bulk enrollment scheduled for membership %1$d into course %2$d', $membership_id, $course_id ) ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.15.0 | Introduced. |