NativeBridgeActivationGate
\Benecaster\Bridge\NativeBridgeActivationGate
Answers two different questions about Benecaster’s built-in membership, and the difference between them is the reason to read this page.
Is built-in membership ready to sell? is_active() is true when a Stripe keyset is configured somewhere on the site — the site-wide keys or any show’s own — and at least one active tier exists on any show. It decides whether Built-in is listed in the bridge picker on Settings → Subscription. It does not decide which bridge a show uses: a show that has chosen Built-in keeps it while the gate is closed.
Is built-in membership being set up? is_in_use() is true when a show has chosen the built-in bridge and at least one active tier exists. Stripe is deliberately not part of it, because a podcaster who has defined tiers and not yet connected Stripe is exactly who needs onboarding. It is the value behind window.benecasterAdmin.nativeBridgeActive in the admin, and the condition on the guided tour’s Memberships steps.
Use is_in_use() for anything that teaches or explains built-in membership, and is_active() for anything that depends on payments actually working.
Constructor Dependencies
| Type | Description |
|---|---|
\Benecaster\Payment\StripeClient |
Reports whether a usable Stripe keyset exists on the site or on any show. |
\Benecaster\Membership\MembershipTierRepository |
Counts active tiers across every show. |
\Benecaster\License\LicenseManager |
Injected but does not affect the result; built-in membership is available on every plan. |
Methods
| Method | Visibility | Since | Description |
|---|---|---|---|
is_active(): bool |
Public | — | True when a Stripe keyset is configured anywhere on the site and at least one active tier exists. The selling gate. |
is_in_use(): bool |
Public | — | True when at least one published show has chosen the built-in bridge and at least one active tier exists. Does not require Stripe. The onboarding gate, and the source of benecasterAdmin.nativeBridgeActive. |
is_chosen_by_any_show(): bool |
Public | — | True when at least one published show has chosen the built-in bridge. True from the moment the setup wizard saves the choice, before Stripe keys or tiers exist. |
has_stripe_keys(): bool |
Public | — | True when a usable Stripe keyset exists, site-wide or on any show. |
has_active_tier(): bool |
Public | — | True when at least one active tier exists on any show. Counts across the whole site, not per show, and reads the database directly so a tier added or deactivated a moment ago is reflected. |
is_available_on_plan(): bool |
Public | — | Always true. Built-in membership is available on every plan. |
Notes
Every check is site-wide. None of these methods takes a show: a tier on any show, or Stripe keys on any show, satisfies them for the whole site.