Classes Reference
The public PHP classes Benecaster exposes, grouped by namespace. Each name links to its reference page with the constructor dependencies, public methods and the hooks the class fires.
Admin
Support Mode’s read-only state in wp-admin.
| Class | Description |
|---|---|
SupportMode |
Public read-only class exposing the current state of Benecaster’s Support Mode feature. |
Analytics
Reads the platform benchmark figures from benecaster.com that the dashboard compares your show against.
| Class | Description |
|---|---|
BenchmarkFetcher |
Fetches platform benchmark statistics from the license server and caches it per license for 24 hours, so each show reads its own license’s figures. |
Availability
Stores when each episode becomes available to each tier, and converts between the times you enter and the times Benecaster stores.
| Class | Description |
|---|---|
AvailabilityRepository |
Reads and writes episode/tier availability rows, and owns the conversion between the two time representations availability uses. |
Avatar
Stores and outputs subscriber avatars.
| Class | Description |
|---|---|
AvatarManager |
Manages subscriber avatar storage and output. |
Bridge
The contract every membership bridge follows, and the classes that detect, activate and look up the bridge a show uses. Start here to write your own bridge.
| Class | Description |
|---|---|
BridgeInterface |
The contract all membership bridges must implement. |
BridgeManager |
Responsible for bridge detection, activation, and lookup. |
BridgeWritable |
Additional interface a bridge must implement to appear as a valid destination in the Promote to Bridge wizard. |
NativeBridgeActivationGate |
Whether built-in membership is ready to sell (is_active()) and whether it is being set up (is_in_use()) — two different answers. |
ManualMembershipUnsupportedTrait |
Provides a throwing default implementation of BridgeInterface::create_manual_membership(). |
PromotionService |
Drives the Promote to Bridge wizard’s run step and grace period management. |
SubscriptionEndReason |
Why a membership ended, as a bridge reports it to the callback registered through BridgeInterface::on_subscription_cancelled(). |
Bridge\Bridges
The built-in bridges: Benecaster’s own built-in membership, plus MemberPress, Paid Memberships Pro, Restrict Content Pro and WooCommerce Subscriptions. Each page covers only what that bridge does differently from the contract.
| Class | Description |
|---|---|
MemberPressBridge |
The built-in bridge for MemberPress and the canonical reference implementation for custom bridge development. |
NativeBridge |
The built-in membership bridge. |
PaidMembershipsBridge |
The built-in bridge for Paid Memberships Pro. |
RestrictContentBridge |
The built-in bridge for Restrict Content Pro. |
WooSubscriptionsBridge |
The built-in bridge for WooCommerce Subscriptions. |
Community
The interface a community platform implements to join the Community Integrations add-on.
| Class | Description |
|---|---|
CommunityPlatformInterface |
The interface a community platform integration must implement to join the Community Integrations add-on. |
Renders each email from its template, and enforces each subscriber’s unsubscribe choices.
| Class | Description |
|---|---|
EmailQueue |
The outgoing email queue. Add-ons may list one job’s per-recipient rows and retry failures, for any email type. |
EmailRenderer |
Renders email templates into the message Benecaster sends. Add-ons call add_template_dir() on it to register a directory of their own email templates. |
UnsubscribeManager |
Manages subscriber email opt-out preferences and unsubscribe tokens, and enforces those preferences at dispatch time by hooking benecaster_email_should_send. |
Email\Warmup
The sending warm-up: how many emails a new or quiet sending address may send each day, and how a bulk send can ask to go more slowly. Emails per hour is the ceiling; the warm-up sits beneath it.
| Class | Description |
|---|---|
WarmupRamp |
Paces a new sending address and projects when a large send will finish. Read it through describe(), posture() and capacity_over_next_days(). |
SendingPosture |
Whether a mail service handles the site’s email, and whether the domain has SPF and DMARC records. |
SendingPace |
The paces a bulk job group can ask for: standard, gentle or slowest. A pace only ever sends less. |
JobPaces |
Records which job groups asked for a gentler pace. |
WarmupState |
Internal. Each sending domain’s history for the warm-up. |
Entitlement
Access a person holds outside their membership tier, such as a single episode or a bundle bought outright.
| Class | Description |
|---|---|
EntitlementRepository |
Benecaster’s record of non-tier access: which episodes or bundles a person holds outside any membership tier. |
GrantSlugResolver |
Answers one question: what access does this person hold on this show that is not part of their tier? |
Episode
Reads episode settings, renders the explicit badge, applies the per-show comments setting and stamps credits onto episodes.
| Class | Description |
|---|---|
CreditStampService |
Internal class responsible for the credit stamp operation. |
EpisodeCommentsGate |
Enforces the per-show comments toggle on episode pages at the WordPress filter layer, without calling remove_post_type_support(). |
EpisodeMeta |
Accessor class for episode-level post meta. |
ExplicitBadgeRenderer |
Renders the explicit-content badge. |
Feed
Serves every feed request, and imports episodes from an existing RSS feed.
| Class | Description |
|---|---|
FeedBulkImporter |
The one-time episode import: every item in a podcast RSS feed becomes a draft episode on a show, in a background WP-Cron job with a progress counter. |
FeedCompiler |
Builds each feed. is_compiling() tells a filter callback whether its output is going into a feed or a web page. |
FeedController |
Front-controller for every feed request. |
Feed\Namespaces
The handlers that write each XML namespace into the feed (iTunes, Podcasting 2.0, Podlove chapters, show notes) and the interfaces for adding your own.
| Class | Description |
|---|---|
ContentNamespace |
Handles the content:encoded tag for episode show notes (full HTML content). |
DataDrivenNamespaceInterface |
Opt-in extension for namespace handlers that render from the filtered benecaster_feed_channel_data / benecaster_feed_episode_data arrays instead of reading show and episode meta themselves. |
FeedNamespaceInterface |
The contract every registered XML namespace handler must implement. |
ItunesNamespace |
Handles all itunes: namespace tags. |
PodcastIndexNamespace |
Implements TierAwareFeedNamespaceInterface. |
PodcastNamespace |
Deprecated — a backward-compatibility shim only, not registered in the namespace registry. |
PodloveNamespace |
Handles psc:chapters (Podlove Simple Chapters). |
TierAwareEpisodeNamespaceInterface |
The episode-level counterpart of TierAwareFeedNamespaceInterface. |
TierAwareFeedNamespaceInterface |
Opt-in extension for feed namespace handlers whose channel-level output depends on which episodes the requesting tier can actually see. |
Fields
The custom fields system: registering field groups and fields, and reading and writing their stored values.
| Class | Description |
|---|---|
FieldRegistry |
Manages CPT registration, field group CRUD, and field definition CRUD for the custom fields system. |
FieldValueStore |
Handles all reads and writes of stored custom field values. |
License
Benecaster’s side of your plan: talking to the license server, the cached plan and add-on entitlements, the payment-failure grace window, and what happens when a show goes over its subscriber limit.
| Class | Description |
|---|---|
GraceExpiryTracker |
Owns the plugin-side payment-failure grace window: when it opened, whether the Day-30 hard cutoff has been applied, and the token bookkeeping at both the cutoff and the recovery. |
LicenseClient |
HTTP client for the Benecaster license server API (https://staging.benecaster.com/wp-json/benecaster-license/v1, overridable with BENECASTER_LICENSE_URL for staging). |
LicenseManager |
The plugin’s cached view of what the license server has said: plan, entitlements, and add-on access. |
LicenseValidationCron |
Daily WP-Cron job on the benecaster_license_validation hook. |
LiveReferralFigures |
The live referral figures from the license server, for the Refer a Friend page and benecaster_get_live_referral_balance(). |
OverLimitFlagManager |
Evaluates over-limit state on every license validation cycle and maintains the is_over_limit flag on subscriber tokens. |
ShowAddonRepository |
Storage for per-show add-on state. |
Membership
Tiers, prices, subscriptions, buy-ups and badges for built-in membership, plus bulk enrollment and the Supporter Wall roster.
| Class | Description |
|---|---|
BadgeChipRenderer |
Renders subscriber badge rows as HTML chip components. |
BadgeReconciler |
Keeps each subscriber’s badge grants in sync with tier badge definitions. |
BulkEnrollBridgeNotBuiltin |
Thrown by BulkEnrollmentProcessor::enroll() when a subscriber batch targets a show whose active bridge is not the built-in membership (operator ruling 2026-09-14). |
BulkEnrollmentJobRunner |
Asynchronous orchestrator around BulkEnrollmentProcessor. |
BulkEnrollmentProcessor |
Synchronous core of bulk enrollment — callable directly from custom code (WP-CLI, scheduled jobs, custom REST endpoints) without going through the cron-backed BulkEnrollmentJobRunner. |
BuyupAutoGrant |
Gives a buy-up to subscribers when it is priced at 0 on their billing period — on save, at sign-up, and on a billing-period switch. |
BuyupDeclineRepository |
Remembers that a subscriber declined a buy-up they were offered free, so it isn’t given to them automatically. |
FreeBuyupBackfillQueue |
The buy-up price rows that have just become free and haven’t been given away yet. |
BuyupBillingCompatibility |
Decides whether a subscriber can buy a buy-up now (billing period, currency, sale window) and which of its price rows they buy. |
BuyupPeriodEndCancellation |
Ends a held buy-up at the end of its billing period — the one path for the subscriber’s Remove button and for a tier upgrade that leaves a buy-up behind. |
BuyupPriceRepository |
Data access for a buy-up’s prices — one row per billing period it is sold on. |
BuyupRepository |
Data access for buy-up definitions, including the sale window. |
FollowerBadgeAppender |
Appends a “Follower” chip to a follower’s badge list when a show is in context, so a follower and a paying subscriber no longer look identical on the Supporter Wall and in [benecaster_user_badge show_id="…"]. |
MembershipPriceRepository |
Data access for the billing cadences attached to a built-in membership tier. |
MembershipTierRepository |
Data access for the tiers sold by the built-in membership system. |
NativeRevenueEstimator |
Works out the dashboard’s “This Month (est.)” revenue for a Built-in Membership show from its subscribers’ billing. |
PauseReasons |
Encodes the sentinel values written to benecaster_subscriptions.paused_reason when this plugin pauses billing on a built-in-membership subscription it created. |
SubscriberBadgeRepository |
CRUD layer for subscriber badge grants — the supported entry point for reading and writing them. |
SubscriberBuyupRepository |
Data access for buy-up grants — who holds which buy-up, and on which Stripe subscription item. |
SubscriptionRepository |
Data access for native membership subscription rows — the records behind Built-in Membership, including billing state, Stripe identifiers and the Promote to Bridge grace-period columns. |
SupporterWallQuery |
Queries the opted-in Supporter Wall roster, joined with user meta for avatar, tier, badges, and “Why I support” messages. |
TenureBadgeAppender |
Injects tenure badge rows into the shared badge pipeline. |
TenureBadgeCalculator |
Computes tenure snapshots from subscriber token records. |
Membership\PriceChange
Changing the price of a tier or buy-up: the stored price changes, and moving subscribers onto the new price when their notice period ends.
| Class | Description |
|---|---|
PriceChangeApplier |
The hourly job that sends due reminders and moves subscribers onto a new price once their notice period has passed. |
PriceChangeRepository |
Data access for price changes and the per-subscriber record of who was told and what happened to them. |
Notices
Creates, shows and dismisses Benecaster’s admin notices.
| Class | Description |
|---|---|
NoticeManager |
Manages admin notices in the Benecaster plugin. |
Notices\HealthChecks
Checks that raise an admin notice when a site needs attention, and the interface for writing your own.
| Class | Description |
|---|---|
HealthCheck |
Interface for custom admin notice health checks. |
Payment
Stripe and other payment gateways: the Stripe client and subscriptions, encrypted storage of donation webhook secrets, and the guard that stops a copied site from charging anyone.
| Class | Description |
|---|---|
DonationWebhookSecrets |
Manages encrypted storage of per-platform webhook verification credentials for non-Stripe Listener Support donation platforms (Ko-fi, PayPal, Buy Me a Coffee). |
NonProductionChargeBlocked |
The exception OutboundChargeGuard throws when a money or subscription-lifecycle call is refused because this install is a copy of the one that armed itself. |
OutboundChargeGuard |
Blocks money movement and subscription-lifecycle writes from an install that is a copy of another one. |
PodcastPaymentGateway |
The payment gateway contract all gateway implementations must satisfy. |
StripeClient |
Wraps the Stripe PHP SDK and owns every Stripe credential Benecaster holds. |
StripeSubscriptionManager |
Thin wrapper over the Stripe Subscriptions and Billing Portal APIs. |
REST
The controllers behind Benecaster’s REST API, covering both the subscriber-facing account endpoints and the admin endpoints the dashboard and settings screens use.
| Class | Description |
|---|---|
AccountController |
REST controller registered at /wp-json/benecaster/v1/account. |
AddonActivationController |
Serves the per-show add-on activation controls on Settings → Add-ons, over `GET |
BillingPortalController |
Subscriber-facing REST endpoints for the native membership billing portal. |
BuyupsAccountController |
Subscriber-facing REST endpoints for buy-up listing, purchase, and cancellation. |
DashboardController |
Dashboard endpoints: the stat cards, the subscriber-growth sparkline and the per-tier breakdown. |
EpisodeChaptersController |
REST controller serving the Podcasting 2.0 chapters JSON endpoint and the auto-suggest endpoint. |
EpisodeCreditsController |
Admin REST endpoint for stamping a credit onto an episode. |
LicenseOAuthController |
Handles connecting and disconnecting a show’s license — POST /license/oauth/start and POST /license/oauth/deactivate. |
LicensePushController |
Inbound receiver for POST /benecaster/v1/license-push. |
ManualSubscriberController |
REST controller for the “Add subscriber manually” admin action. |
MembershipStripeSettingsController |
Admin REST endpoints for the Settings → Payments panel. |
PriceChangesController |
Admin endpoints to list pending and past price changes, cancel one, and retry the subscribers it failed to move. |
ShowCreditsController |
Admin REST controller for per-show episode credit templates. |
SupporterWallController |
REST controller for the public Supporter Wall endpoint. |
Security
Watches for feed requests using tokens that match no subscriber, and warns you when a show sees too many.
| Class | Description |
|---|---|
InvalidTokenMonitor |
Counts feed requests whose token matches no subscriber and raises an admin notice when a show sees too many. |
Show
Reads show-level settings.
| Class | Description |
|---|---|
ShowMeta |
Accessor class for show-level post meta. |
Staging
Decides whether this install is production or staging, notices when a site has been copied, and manages the subscriber set a staging site uses.
| Class | Description |
|---|---|
EnvironmentResolver |
The one place BENECASTER_IS_PRODUCTION and BENECASTER_STAGING are read, and the one place the precedence between them is expressed. |
InstallIdentity |
Answers one question: is this still the install it was when it first armed itself? |
StagingManager |
The entry point for staging mode detection and staging subscriber-set management. |
Support
Shared utilities: rate limiting, the signed single-use links Benecaster emails to subscribers, and the signup password rules.
| Class | Description |
|---|---|
RateLimitStore |
The shared fixed-window counter behind every rate limit in the plugin — today the REST limiter and the [benecaster_follower_signup] abuse throttle. |
SignedLink |
Mints and validates the HMAC-SHA256 signed, time-limited, single-use links Benecaster emails to subscribers. |
SignupPasswordPolicy |
The single definition of the password rules applied when a subscriber chooses their own password during signup. |
SupporterWall
Each subscriber’s choice to appear on the Supporter Wall, and their “Why I support” message.
| Class | Description |
|---|---|
SupporterWallManager |
Manages the per-subscriber opt-in flag and “Why I support” message for the Supporter Wall. |
Token
Subscriber feed tokens: creating, changing and revoking them, the token types Benecaster knows about, and the rules each one follows.
| Class | Description |
|---|---|
BackdateGuard |
Validates a backdated created_at before it reaches a token row. |
RevocationReasons |
Encodes the sentinel values recorded as a token’s revocation reason, and answers the one question the token lifecycle needs from them: may a later subscription activation event bring this token back? |
TokenManager |
Service layer for the subscriber token lifecycle. |
TokenRepository |
Data-access layer for subscriber feed tokens — the supported entry point for reading and writing token records. |
TokenTypeRegistry |
The list of token types Benecaster knows about, and the rules for how each one behaves. |
See Also
Need this built rather than just documented? See our services →
Last updated