ActionScheduler_wpPostStore::get_claim_count()publicWC 1.0

Get claim count.

Метод класса: ActionScheduler_wpPostStore{}

Хуков нет.

Возвращает

int.

Использование

$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore();
$ActionScheduler_wpPostStore->get_claim_count();

Код ActionScheduler_wpPostStore::get_claim_count() WC 7.1.0

public function get_claim_count() {
	global $wpdb;

	// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching
	return $wpdb->get_var(
		$wpdb->prepare(
			"SELECT COUNT(DISTINCT post_password) FROM {$wpdb->posts} WHERE post_password != '' AND post_type = %s AND post_status IN ('in-progress','pending')",
			array( self::POST_TYPE )
		)
	);
}