WordPress at Your Fingertips
function is not described

ActionScheduler_WPCLI_QueueRunner::maybe_stop_the_insanity() protected WC 1.0

{} It's a method of the class: ActionScheduler_WPCLI_QueueRunner{}

No Hooks.

Return

null. Nothing.

Usage

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

Code of ActionScheduler_WPCLI_QueueRunner::maybe_stop_the_insanity() WC 6.1.0

protected function maybe_stop_the_insanity() {
	// The value returned by progress_bar->current() might be padded. Remove padding, and convert to int.
	$current_iteration = intval( trim( $this->progress_bar->current() ) );
	if ( 0 === $current_iteration % 50 ) {
		$this->stop_the_insanity();
	}
}