Which subscriber count is the paying one
Benecaster issues a token to three different populations: paying subscribers, free-tier bridge members (a [Free] MemberPress level mapped into Benecaster, say), and direct followers who came in through [benecaster_follower_signup] with no bridge at all. For a paying count, call benecaster_count_paying_subscribers() for one show or benecaster_count_paying_subscribers_site_wide() for every show on the site.
A token counts as paying when both of these hold, and the functions apply both:
-
Its type is not exempt. Followers and purchasers are exempt. Every other type counts as paying, including one an add-on defines.
-
Its tier is not free. Members on a free tier hold ordinary subscriber tokens, so the type alone does not exclude them. This covers membership-plugin tiers and built-in membership tiers alike. A tier Benecaster does not recognize counts as paying, so the count can never fall short.
Do not query the tables for this. The storage layout is internal and changes between releases, and a copied query keeps returning a plausible-looking number after it stops being the right one. The functions always use Benecaster’s own definition of paying.
Do not reach for benecaster_get_subscriber_count() here. It counts every active token for the show, followers and free-tier members included, which is precisely the miscount this recipe exists to prevent. It is the right function for audience size and the wrong one for anything about money. See Looking Up a Subscriber for the two side by side.
The site-wide count counts tokens, not people. A subscriber paying for two shows counts twice, so it equals the sum of the per-show counts. That is what the license server counts and what is enforced against your plan’s subscriber limit. Benecaster exposes no distinct-people count.
Neither function is filterable, deliberately. These are the numbers the plan threshold is decided from, and a filter would invite integrations to “adjust” a figure whose only useful property is that it says what is actually in the database.
Where to call them
The functions need nothing but WordPress and Benecaster loaded: a theme template, a snippet plugin, a WP-CLI command in a sibling plugin, another add-on. No container, no class import.
If you already hold the repository, typically inside an add-on that resolved it from the container for something else, TokenRepository::count_paying_by_show() and count_paying_site_wide() are identical and save constructing a second instance.
For a reporting tool or a script running outside WordPress, have it ask WP-CLI on the site’s server:
wp eval 'echo benecaster_count_paying_subscribers_site_wide();'
Code
<?php
// The paying count for one show, and across every show on the site.
$count = benecaster_count_paying_subscribers( $show_id );
$site_count = benecaster_count_paying_subscribers_site_wide();
// For contrast: every active token, followers and free-tier members
// included. An audience size, not a paying count.
$audience = benecaster_get_subscriber_count( $show_id );
printf( '%d paying of %d listeners', $count, $audience );
Need this built rather than just documented? See our services →