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


Top ↑

Return Return

(void)


Top ↑

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 ) );

		}

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.15.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.