PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.8.1
GiveWP – Donation Plugin and Fundraising Platform v4.16.8.1
4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 All 254 releases
give / src / License / LicenseServiceProvider.php

LicenseServiceProvider.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.8.1, at src/License/LicenseServiceProvider.php

40 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\License;
4
5 use Give\Framework\Migrations\MigrationsRegister;
6 use Give\Helpers\Hooks;
7 use Give\License\Actions\AddPlatformFeeAmountToSystemInfo;
8 use Give\License\Migrations\RefreshLicensesForPlatformFee;
9 use Give\License\Migrations\RefreshLicensesForLastActiveDate;
10 use Give\License\Repositories\LicenseRepository;
11 use Give\ServiceProviders\ServiceProvider;
12
13 class LicenseServiceProvider implements ServiceProvider
14 {
15 /**
16 * @since 4.3.0 added LicenseRepository singleton
17 * @since 2.11.3
18 */
19 public function register()
20 {
21 give()->singleton(PremiumAddonsListManager::class);
22 give()->singleton(LicenseRepository::class);
23 }
24
25 /**
26 * @since 4.3.0 added refresh-licenses-for-platform-fee migration
27 * @since 2.11.3
28 */
29 public function boot()
30 {
31 /** @var MigrationsRegister $migrationRegistrar */
32 $migrationRegistrar = give(MigrationsRegister::class);
33
34 $migrationRegistrar->addMigration(RefreshLicensesForPlatformFee::class);
35 $migrationRegistrar->addMigration(RefreshLicensesForLastActiveDate::class);
36
37 Hooks::addAction('give_add_system_info_configuration', AddPlatformFeeAmountToSystemInfo::class);
38 }
39 }
40