Skip to main content

benecaster_is_premium()

Utilities Free
benecaster_is_premium( int|string $show_context ): bool

Returns whether the given show has paid features. The show context is required: pass a show post ID or the show’s _benecaster_show_uuid. Calling it with no argument is an error. Equivalent to LicenseManager::is_premium() without requiring container access. Safe to call from theme code, add-ons, or any context outside the plugin container.

The answer is about the show, not the site. A show that is not connected to Benecaster returns false even when the site’s license is active, so a show that was never connected, or has just been disconnected, never counts as paid.

When no show is in scope — a global template that runs outside any show loop — use benecaster_any_show_is_premium() instead, which returns true if any show on the install has an active premium license.

Returns false while the license is Suspended, Cancelled or Expired. Subscriber feeds follow their own rules in those states, so do not use this function to gate feed delivery logic. Use it for admin UI, conditional feature display, and add-on activation checks.

Parameters

Name Type Default Required Description
$show_context int|string — Yes The show's post ID, or its _benecaster_show_uuid

Return Value

Type: bool

true when the given show is connected to Benecaster and its license is on a paid plan that is Active or Expiring. false for a show that is not connected (never connected, or disconnected), for a show that has to be reconnected, while the license is Suspended, Cancelled or Expired, on free installs, and for a context that resolves to no show.

Example

if ( benecaster_is_premium( $show_id ) ) {
    // show subscriber count or other premium-only UI
}

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