LLMS_Abstract_Processor::disable()

Disable a processor


Description Description

Useful when bulk enrolling into a membership (for example) so we don’t trigger course data calculations a few hundred times.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/abstracts/llms.abstract.processor.php

	public function disable() {

		remove_action( $this->cron_hook_identifier, array( $this, 'handle_cron_healthcheck' ) );
		foreach ( $this->get_actions() as $action => $data ) {

			$data = wp_parse_args(
				$data,
				array(
					'arguments' => 1,
					'priority'  => 10,
				)
			);

			remove_action( $action, array( $this, $data['callback'] ), $data['priority'], $data['arguments'] );

		}

	}


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.