ActionScheduler_Abstract_QueueRunner_Deprecated::get_maximum_execution_timeprotectedWC 1.0

Deprecated since 2.1.1. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.

Get the maximum number of seconds a batch can run for.

Method of the class: ActionScheduler_Abstract_QueueRunner_Deprecated{}

Returns

Int. The number of seconds.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_maximum_execution_time();

Changelog

Deprecated since 2.1.1

ActionScheduler_Abstract_QueueRunner_Deprecated::get_maximum_execution_time() code WC 10.5.0

protected function get_maximum_execution_time() {
	_deprecated_function( __METHOD__, '2.1.1', 'ActionScheduler_Abstract_QueueRunner::get_time_limit()' );

	$maximum_execution_time = 30;

	// Apply deprecated filter.
	if ( has_filter( 'action_scheduler_maximum_execution_time' ) ) {
		_deprecated_function( 'action_scheduler_maximum_execution_time', '2.1.1', 'action_scheduler_queue_runner_time_limit' );
		$maximum_execution_time = apply_filters( 'action_scheduler_maximum_execution_time', $maximum_execution_time );
	}

	return absint( $maximum_execution_time );
}