LLMS_Notifications::schedule_processors_dispatch()
Check for processors that have items in the queue
Description Description
For any found processors, saves their queue and schedules them to be processes via a scheduled event.
Return Return
(array) Array containing information about the scheduled processors.<br> The array keys will be the processor ID and the values will be the timestamp of the event or a WP_Error object.
Source Source
File: includes/notifications/class.llms.notifications.php
public function schedule_processors_dispatch() {
$scheduled = array();
if ( $this->processors_to_dispatch ) {
foreach ( $this->processors_to_dispatch as $key => $id ) {
// Retrieve the processor.
$processor = $this->get_processor( $id );
// Remove it from the list of processors to dispatch.
unset( $this->processors_to_dispatch[ $key ] );
$scheduled[ $id ] = $processor ? $this->schedule_single_processor( $processor, $id ) : new WP_Error(
'invalid-processor',
// Translators: %s = Processor ID.
sprintf( __( 'The processor "%s" does not exist.', 'lifterlms' ), $id )
);
}
}
return $scheduled;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.38.0 | Introduced. |