WordPress at Your Fingertips
function is not described

WC_Background_Process::is_queue_empty() protected WC 1.0

Is queue empty.

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

No Hooks.

Return

true|false.

Usage

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

Code of WC_Background_Process::is_queue_empty() WC 5.5.2

<?php
protected function is_queue_empty() {
	global $wpdb;

	$table  = $wpdb->options;
	$column = 'option_name';

	if ( is_multisite() ) {
		$table  = $wpdb->sitemeta;
		$column = 'meta_key';
	}

	$key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%';

	$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$table} WHERE {$column} LIKE %s", $key ) ); // @codingStandardsIgnoreLine.

	return ! ( $count > 0 );
}