benecaster_get_plan_label()
benecaster_get_plan_label( string $slug ): string
Turns a plan slug into the name a podcaster would recognise. Pair it with benecaster_get_license_plan(), which gives you the slug for the current site.
Names come from the pricing catalogue Benecaster keeps in sync with the licence server, so a plan renamed on our side shows its new name here without a plugin update. Before the first validation on a fresh install the catalogue may not have arrived yet, and the fallback titlecases the slug — good enough to display, which is why this never returns nothing.
Parameters
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
$slug |
string |
— | Yes | A plan slug, e.g. 'growth', 'multi-show', 'studio'. |
Return Value
Type:
string
The plan's display name. Always a non-empty string — an unrecognised slug comes back titlecased rather than empty or null, so it is safe to print without a guard.
Example
$slug = benecaster_get_license_plan();
$label = $slug ? benecaster_get_plan_label( $slug ) : 'Unlicensed';
printf( '<p>Current plan: <strong>%s</strong></p>', esc_html( $label ) );
Need this built rather than just documented? See our services →