HEX
Server: LiteSpeed
System: Linux server315.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: globfdxw (6114)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //home/globfdxw/www/wp-content/plugins/give/src/License/LicenseServiceProvider.php
<?php

namespace Give\License;

use Give\Framework\Migrations\MigrationsRegister;
use Give\Helpers\Hooks;
use Give\License\Actions\AddPlatformFeeAmountToSystemInfo;
use Give\License\Migrations\RefreshLicensesForPlatformFee;
use Give\License\Migrations\RefreshLicensesForLastActiveDate;
use Give\License\Repositories\LicenseRepository;
use Give\ServiceProviders\ServiceProvider;

class LicenseServiceProvider implements ServiceProvider
{
    /**
     * @since 4.3.0 added LicenseRepository singleton
     * @since 2.11.3
     */
    public function register()
    {
        give()->singleton(PremiumAddonsListManager::class);
        give()->singleton(LicenseRepository::class);
    }

    /**
     * @since 4.3.0 added refresh-licenses-for-platform-fee migration
     * @since 2.11.3
     */
    public function boot()
    {
        /** @var MigrationsRegister $migrationRegistrar */
        $migrationRegistrar = give(MigrationsRegister::class);

        $migrationRegistrar->addMigration(RefreshLicensesForPlatformFee::class);
        $migrationRegistrar->addMigration(RefreshLicensesForLastActiveDate::class);

        Hooks::addAction('give_add_system_info_configuration', AddPlatformFeeAmountToSystemInfo::class);
    }
}