Skip to main content

Tell the Add-ons screen that this add-on plugin is loaded

Free Beginner Since v1.0.0

Benecaster fires benecaster_installed_addons during admin bootstrapping to build the list of loaded add-ons. Each add-on plugin should hook this filter inside its benecaster_boot callback and append its fully-qualified slug. Without this hook, a purchased-and-activated add-on renders as “Ready to install” because the Add-ons screen has no other way to distinguish entitled from actually loaded. The registry deduplicates.

Code

<?php
add_action( 'benecaster_boot', function (): void {
    add_filter( 'benecaster_installed_addons', static function ( array $slugs ): array {
        $slugs[] = 'benecaster-addon-guest-manager';
        return $slugs;
    } );
} );

View on GitHub →

Hooks Used