# give/4.17.0/src/VendorOverrides/Harbor/HarborServiceProvider.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.17.0. 51 lines.

- Page: https://pluginprobe.com/plugins/give/4.17.0/code/src/VendorOverrides/Harbor/HarborServiceProvider.php
- Raw: https://pluginprobe.com/plugins/give/4.17.0/raw/src/VendorOverrides/Harbor/HarborServiceProvider.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.17.0/code/src/VendorOverrides/Harbor/HarborServiceProvider.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace Give\VendorOverrides\Harbor;

use Give\Helpers\Hooks;
use Give\ServiceProviders\ServiceProvider as ServiceProviderContract;
use Give\VendorOverrides\Harbor\Actions\HasActivePremiumAddons;
use Give\VendorOverrides\Harbor\Actions\ReportLegacyLicences;
use Give\Vendors\LiquidWeb\Harbor\Config;
use Give\Vendors\LiquidWeb\Harbor\Harbor;

/**
 * @since 4.15.0
 */
class HarborServiceProvider implements ServiceProviderContract
{
    /**
     * @since 4.15.2 Register lw_harbor/premium_plugin_exists filter
     * @since 4.15.0
     *
     * @inheritDoc
     */
    public function register()
    {
        Config::set_plugin_basename(GIVE_PLUGIN_BASENAME);
        Config::set_container(give()->getContainer());

        // reports whether any GiveWP premium add-on is active to Harbor
        Hooks::addFilter('lw_harbor/premium_plugin_exists', HasActivePremiumAddons::class);

        Harbor::init();
    }

    /**
     * @since 4.15.0
     *
     * @inheritDoc
     */
    public function boot()
    {
        // reports legacy licenses to Harbor
        Hooks::addFilter('stellarwp/harbor/legacy_licenses', ReportLegacyLicences::class);

        // adds a "licensing" submenu to Give
        lw_harbor_register_submenu('edit.php?post_type=give_forms');
    }

}

```
