Automattic\WooCommerce\Internal\StockNotifications

NotificationQuery::count_notifications │ public static │ WC 1.0

Count notifications matching the given filters.

Method of the class: NotificationQuery{}

No Hooks.

Returns

int. Number of matching notifications.

Usage

$result = NotificationQuery::count_notifications( $args ): int;
$args(array) (required)
Same filter args as {@see self::get_notifications()}, minus the return / limit / offset keys (those are forced to count / no-limit).

NotificationQuery::count_notifications() code WC 11.2.1

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

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