Automattic\WooCommerce\Internal\BatchProcessing

BatchProcessingController::get_enqueued_processors()publicWC 1.0

Helper method to get list of all the enqueued processors.

Method of the class: BatchProcessingController{}

No Hooks.

Returns

Array. List (of string) of the class names of the enqueued processors.

Usage

$BatchProcessingController = new BatchProcessingController();
$BatchProcessingController->get_enqueued_processors(): array;

BatchProcessingController::get_enqueued_processors() code WC 9.8.5

public function get_enqueued_processors(): array {
	$enqueued_processors = get_option( self::ENQUEUED_PROCESSORS_OPTION_NAME, array() );

	if ( ! is_array( $enqueued_processors ) ) {
		$this->logger->error( 'Could not fetch list of processors. Clearing up queue.', array( 'source' => 'batch-processing' ) );
		delete_option( self::ENQUEUED_PROCESSORS_OPTION_NAME );
		$enqueued_processors = array();
	}

	return $enqueued_processors;
}