ActionScheduler_DBStore::get_claim_count()
Get the number of active claims.
Метод класса: ActionScheduler_DBStore{}
Хуков нет.
Возвращает
int
.
Использование
$ActionScheduler_DBStore = new ActionScheduler_DBStore(); $ActionScheduler_DBStore->get_claim_count();
Код ActionScheduler_DBStore::get_claim_count() ActionScheduler DBStore::get claim count WC 8.7.0
public function get_claim_count() { global $wpdb; $sql = "SELECT COUNT(DISTINCT claim_id) FROM {$wpdb->actionscheduler_actions} WHERE claim_id != 0 AND status IN ( %s, %s)"; $sql = $wpdb->prepare( $sql, array( self::STATUS_PENDING, self::STATUS_RUNNING ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared return (int) $wpdb->get_var( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared }