LLMS_Processor_Course_Data::schedule_calculation( int $course_id, int $time = null )

Schedule a calculation to execute This will schedule an event that will setup the queue of items for the background process


Description Description


Parameters Parameters

$course_id

(int) (Required) WP Post ID of the course

$time

(int) (Optional) y pass a timestamp for when the event should be run

Default value: null


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/processors/class.llms.processor.course.data.php

	public function schedule_calculation( $course_id, $time = null ) {

		$this->log( sprintf( 'course data calculation triggered for course %d', $course_id ) );

		$args = array( $course_id );

		if ( ! wp_next_scheduled( $this->schedule_hook, $args ) ) {

			$time = ! $time ? time() : $time;

			wp_schedule_single_event( $time, $this->schedule_hook, $args );
			$this->log( sprintf( 'course data calculation scheduled for course %d', $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.