# give/4.18.0/src/VendorOverrides/Harbor/Actions/HasActivePremiumAddons.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.18.0. 36 lines.

- Page: https://pluginprobe.com/plugins/give/4.18.0/code/src/VendorOverrides/Harbor/Actions/HasActivePremiumAddons.php
- Raw: https://pluginprobe.com/plugins/give/4.18.0/raw/src/VendorOverrides/Harbor/Actions/HasActivePremiumAddons.php
- Modified: 2026-05-14T03:02:24+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.18.0/code/src/VendorOverrides/Harbor/Actions/HasActivePremiumAddons.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace Give\VendorOverrides\Harbor\Actions;

/**
 * Return true if another brand already has premium presence or if any GiveWP premium add-on is active.
 *
 * Hooked into the `lw_harbor/premium_plugin_exists` filter.
 *
 * @since 4.15.2
 */
class HasActivePremiumAddons
{
    /**
     * @since 4.15.2
     */
    public function __invoke(bool $otherBrandsExistence): bool
    {
        if ($otherBrandsExistence) {
            return true;
        }

        $premiumAddons = give_get_plugins(['only_premium_add_ons' => true]);

        foreach ($premiumAddons as $addon) {
            if ($addon['Status'] === 'active') {
                return true;
            }
        }

        return false;
    }
}

```
