Skip to main content

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

Class Description
DiagnosticLogSender Builds and sends a diagnostic snapshot to Benecaster support.
EpisodeAdminColumns Adds the Explicit column to the episodes list screen at edit.php?post_type=benecaster_episode, makes it sortable and filterable, and wires the three-value Explicit control into Quick Edit.
SupportMode Public read-only class exposing the current state of Benecaster’s Support Mode feature.

Analytics

Class Description
BenchmarkFetcher Fetches platform benchmark statistics from the license server and caches the response in the benecaster_benchmark_data transient for 24 hours.

Availability

Class Description
AvailabilityRepository Reads and writes episode/tier availability rows, and owns the conversion between the two time representations availability uses.

Avatar

Class Description
AvatarManager Manages subscriber avatar storage and output.

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.
ManualMembershipUnsupportedTrait Provides a throwing default implementation of BridgeInterface::create_manual_membership().
NullBridge A safe, inert implementation of BridgeInterface returned by BridgeManager when no subscription plugin is configured or when an unknown slug is requested.
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().

BridgeBridges

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

Class Description
CommunityPlatformInterface The interface a community platform integration must implement to join the Community Integrations add-on.

Cron

Class Description
ExportTtlCleanupCron Daily WP-Cron job that deletes expired data-export files from wp-content/uploads/benecaster/exports/.
ManualGrantExpiryCron Hourly WP-Cron job that expires admin-comped subscriber grants.
RenewalReminderCron Daily cron job that sends renewal reminder emails to built-in membership subscribers whose billing period ends within a configurable window.

Email

Class Description
EmailTriggers Central class that wires plugin-generated lifecycle events to email dispatch.
SubscribeGuestPasswordListener Sends the guest_password_set email to someone whose WordPress account was created for them, so they have a way into it.
UnsubscribeManager Manages subscriber email opt-out preferences and unsubscribe tokens, and enforces those preferences at dispatch time by hooking benecaster_email_should_send.

Entitlement

Class Description
EntitlementRepository Core’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

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

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.
FeedController Front-controller for every feed request.
FeedTierGate Resolves [benecaster_tier_gate] in show and episode post_content bound for the RSS feed, for the tier being compiled.
PodcastChaptersUrlProvider Registers on the benecaster_feed_podcast_episode_tags filter (priority 10, 3 args) and injects a chapters entry (url + type) into the episode tag map when the episode has authored chapters AND no upstream caller has…
PscChapterProvider Registers on the benecaster_psc_chapters filter (priority 10, 2 args) and translates _benecaster_chapters post meta rows into the shape PodloveNamespace expects: {start, title, href?, image?}.

FeedNamespaces

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

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

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://benecaster.com/wp-json/benecaster-license/v1, overridable with BENECASTER_LICENSE_URL for staging).
LicenseManager The plugin’s cached view of what the licence 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 licence server, for the Refer a Friend page and benecaster_get_live_referral_balance().
OverLimitEffect The single answer to “what is an over-limit flag actually doing to this token?”
OverLimitFlagManager Evaluates over-limit state on every licence validation cycle and maintains the is_over_limit flag on subscriber tokens.
ShowAddonRepository Storage for per-show add-on state.
TierUpgradeManager Fires a one-per-month warning when a site reaches 80% of its plan’s paying-subscriber limit, and keeps two local subscriber-count history values.

Membership

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.
BuyupCapLock Serializes capped buy-up purchases through MySQL advisory locks to prevent concurrent purchases from racing past the subscriber cap.
BuyupWebhookSyncListener Listens to normalized Stripe subscription webhook routing actions and reconciles Benecaster’s stored buy-up grants against Stripe’s subscription item state.
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.
NativeSubscriptionManager Orchestrates subscription provisioning for the NativeBridge: creates subscription rows, mints tokens via the activation cascade, and handles the shared logic used by both ManualSubscriberController and…
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.
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.

Notices

Class Description
NoticeManager Manages admin notices in the Benecaster plugin.

NoticesHealthChecks

Class Description
HealthCheck Interface for custom admin notice health checks.
WooMembershipsFallbackCheck Health check that detects shows still configured with the removed woo-memberships bridge and surfaces a dismissible admin warning guiding operators to switch bridges.

Payment

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.
StripeBuyupProvisioner Eagerly provisions Stripe Products and Prices for buy-up definitions.
StripeClient Wraps the Stripe PHP SDK and owns every Stripe credential Benecaster holds.
StripeCustomerProvisioner Creates or reuses Stripe Customer objects for built-in membership signups.
StripeSubscriptionManager Thin wrapper over the Stripe Subscriptions and Billing Portal APIs.
StripeTierProvisioner Auto-creates and maintains Stripe Products and Prices for built-in membership tiers.

REST

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.
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.
LicenseController REST controller for licence state, on-demand validation, one-click plan upgrade, and enforcement and telemetry preferences.
LicenseOAuthController Handles connecting and disconnecting a show’s licence — 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 → Membership → Payments panel.
ShowCreditsController Admin REST controller for per-show episode credit templates.
SupporterWallController REST controller for the public Supporter Wall endpoint.

Security

Class Description
InvalidTokenMonitor Added feature/invalid-token-monitoring, in a new Security namespace.

Shortcodes

Class Description
AccountShortcode Renders the subscriber account dashboard ([benecaster_account]).
SupporterWallShortcode Renders the [benecaster_supporter_wall] shortcode — a grid of opted-in subscribers with avatars, display names, tier badges, and optionally their “Why I support” message.
TierGateEvaluator The two decisions behind [benecaster_tier_gate], shared by the website (TierGateShortcode, evaluated per visitor) and the RSS feed (FeedTierGate, evaluated per compiled tier).
TierGateShortcode Implements [benecaster_tier_gate] and registers the [benecaster_else] marker.

Show

Class Description
ShowMeta Accessor class for show-level post meta.

Staging

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

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.
SignedLinkEndpoint Consumes the token on an emailed SignedLink and acts on it.
SignupPasswordPolicy The single definition of the password rules applied when a subscriber chooses their own password during signup.

SupporterWall

Class Description
SupporterWallManager Manages the per-subscriber opt-in flag and “Why I support” message for the Supporter Wall.

Token

Class Description
BackdateGuard Validates a backdated created_at before it reaches a token row.
BlockedReactivationNoticePublisher Turns a refused reactivation into something the podcaster actually sees.
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 core knows about, and the rules for how each one behaves.

See Also

Need this built rather than just documented? See our services →

Last updated