ActionScheduler_wpPostStore::get_claim_count()publicWC 1.0

Get claim count.

Method of the class: ActionScheduler_wpPostStore{}

No Hooks.

Return

Int.

Usage

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

ActionScheduler_wpPostStore::get_claim_count() code WC 8.7.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 )
		)
	);
}