Skip to main content

benecaster_count_paying_subscribers()

Counts paying subscribers for one show. This is the function to reach for whenever the question is about money or plan limits.

“Paying” means two things at once: the token’s type is not one core exempts from paying (TokenRepository::PAYING_EXEMPT_TOKEN_TYPES, follower today), and its mapped tier is not a free tier. Both filters are required, and applying only one miscounts. The first excludes direct followers, who hold no bridge membership — but it is a deny list, not an allow list of the subscriber type: any other token type counts, including one an add-on defines that core has never heard of, and the exempt list can grow (Episode Sales adds purchaser). The second excludes bridge members sitting on a $0 mapped tier, who do carry a subscriber token. A hand-rolled count that filters on token_type = 'subscriber' instead of the exempt-type deny list under-counts, silently — a custom or add-on-defined token type on a paid tier is real paying capacity it will miss.

Manual grants are counted. A comped subscriber on a paid tier consumes real capacity, so they belong in the figure.

This is a different number from benecaster_get_subscriber_count(), which counts every active token including followers and free-tier members. The two disagreeing is the correct outcome, not a bug — they answer different questions, and on a show with a large free following they differ by a wide margin.