Automattic\WooCommerce\Internal\StockNotifications
NotificationQuery::count_notifications
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/offsetkeys (those are forced tocount/ no-limit).
Код NotificationQuery::count_notifications() 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 );
}