PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 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 All 255 releases
← All changes | src/License/LicenseServiceProvider.php +16 -0 2.30.04.16.9 View file →
@@ -1,23 +1,39 @@
1 1 <?php
2 2
3 3 namespace Give\License;
4 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;
5 11 use Give\ServiceProviders\ServiceProvider;
6 12
7 13 class LicenseServiceProvider implements ServiceProvider
8 14 {
9 15 /**
16 + * @since 4.3.0 added LicenseRepository singleton
10 17 * @since 2.11.3
11 18 */
12 19 public function register()
13 20 {
14 21 give()->singleton(PremiumAddonsListManager::class);
22 + give()->singleton(LicenseRepository::class);
15 23 }
16 24
17 25 /**
26 + * @since 4.3.0 added refresh-licenses-for-platform-fee migration
18 27 * @since 2.11.3
19 28 */
20 29 public function boot()
21 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);
22 38 }
23 39 }