Automattic\WooCommerce\Internal\StockNotifications

NotificationQuery::count_notifications │ public static │ WC 1.0

Count notifications matching the given filters.

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

Хуков нет.

Возвращает

int. Number of matching notifications.

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

$result = NotificationQuery::count_notifications( $args ): int;
$args(массив) (обязательный)
Same filter args as {@see self::get_notifications()}, minus the return / limit / offset keys (those are forced to count / no-limit).

Код NotificationQuery::count_notifications() WC 11.2.2

public static function count_notifications( array $args ): int {
	$args['return'] = 'count';
	unset( $args['limit'], $args['offset'] );

	return (int) self::run_query( $args );
}