PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0
GiveWP – Donation Plugin and Fundraising Platform v4.18.0
4.18.0 4.17.0 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 All 257 releases
give / src / VendorOverrides / Harbor / Actions / HasActivePremiumAddons.php

HasActivePremiumAddons.php in GiveWP – Donation Plugin and Fundraising Platform 4.18.0, at src/VendorOverrides/Harbor/Actions/HasActivePremiumAddons.php

36 lines 743 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Give\VendorOverrides\Harbor\Actions;
6
7 /**
8 * Return true if another brand already has premium presence or if any GiveWP premium add-on is active.
9 *
10 * Hooked into the `lw_harbor/premium_plugin_exists` filter.
11 *
12 * @since 4.15.2
13 */
14 class HasActivePremiumAddons
15 {
16 /**
17 * @since 4.15.2
18 */
19 public function __invoke(bool $otherBrandsExistence): bool
20 {
21 if ($otherBrandsExistence) {
22 return true;
23 }
24
25 $premiumAddons = give_get_plugins(['only_premium_add_ons' => true]);
26
27 foreach ($premiumAddons as $addon) {
28 if ($addon['Status'] === 'active') {
29 return true;
30 }
31 }
32
33 return false;
34 }
35 }
36