Tribe__Process__Queue::get_batch_key( int $n )

Returns the name of the option used by the queue to store its batch(es).

Mind that this value will be set only when first saving the queue and it will not be set in following queue processing.


Parameters

$n

(int) (Required) The number of a specific batch option name to get; defaults to 0 to get the option name of the first one.


Top ↑

Return

(string)


Top ↑

Source

File: src/Tribe/Process/Queue.php

	public function get_batch_key( $n = 0 ) {
		if ( null === $this->batch_key || ! $this->did_save ) {
			throw new RuntimeException( 'The batch key will only be set after the queue is first saved' );
		}

		return empty( $n ) ? $this->batch_key : $this->batch_key . '_' . (int) $n;
	}

Top ↑

Changelog

Changelog
Version Description
4.7.12 Introduced.