benecaster_get_license_plan()
benecaster_get_license_plan(): string
Returns which plan the site is on. Reads from a local cache rather than calling the licence server, so it is safe on every request — the value refreshes during the daily validation run.
Use benecaster_is_premium() when all you need is paid-or-not. Use this when the answer differs by plan, and compare against the slug rather than trying to rank the string yourself.
Return Value
Type:
string
The current plan slug, or an empty string when no licence is active. One of free, starter, growth, pro, multi_show, studio. Note that an active free Launch plan returns free, not an empty string: an empty string means no licence, which is not the same thing.
Example
// Enable a feature only on Growth or higher.
$plan = benecaster_get_license_plan();
if ( in_array( $plan, [ 'growth', 'pro', 'multi_show', 'studio' ], true ) ) {
// Register the growth-tier feature.
}
Need this built rather than just documented? See our services →