← All changes
|
src/VendorOverrides/Harbor/HarborServiceProvider.php
+5
-0
4.15.1
→
4.17.0
View file →
| @@ -5,8 +5,9 @@ | ||
| 5 | 5 | namespace Give\VendorOverrides\Harbor; |
| 6 | 6 | |
| 7 | 7 | use Give\Helpers\Hooks; |
| 8 | 8 | use Give\ServiceProviders\ServiceProvider as ServiceProviderContract; |
| 9 | +use Give\VendorOverrides\Harbor\Actions\HasActivePremiumAddons; | |
| 9 | 10 | use Give\VendorOverrides\Harbor\Actions\ReportLegacyLicences; |
| 10 | 11 | use Give\Vendors\LiquidWeb\Harbor\Config; |
| 11 | 12 | use Give\Vendors\LiquidWeb\Harbor\Harbor; |
| 12 | 13 | |
| @@ -15,8 +16,9 @@ | ||
| 15 | 16 | */ |
| 16 | 17 | class HarborServiceProvider implements ServiceProviderContract |
| 17 | 18 | { |
| 18 | 19 | /** |
| 20 | + * @since 4.15.2 Register lw_harbor/premium_plugin_exists filter | |
| 19 | 21 | * @since 4.15.0 |
| 20 | 22 | * |
| 21 | 23 | * @inheritDoc |
| 22 | 24 | */ |
| @@ -23,8 +25,11 @@ | ||
| 23 | 25 | public function register() |
| 24 | 26 | { |
| 25 | 27 | Config::set_plugin_basename(GIVE_PLUGIN_BASENAME); |
| 26 | 28 | Config::set_container(give()->getContainer()); |
| 29 | + | |
| 30 | + // reports whether any GiveWP premium add-on is active to Harbor | |
| 31 | + Hooks::addFilter('lw_harbor/premium_plugin_exists', HasActivePremiumAddons::class); | |
| 27 | 32 | |
| 28 | 33 | Harbor::init(); |
| 29 | 34 | } |
| 30 | 35 | |