License.php
24 lines
| 1 | <?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing |
| 2 | |
| 3 | namespace MailPoet\Util\License; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | class License { |
| 9 | const FREE_PREMIUM_SUBSCRIBERS_LIMIT = 1000; |
| 10 | |
| 11 | public static function getLicense($license = false) { |
| 12 | if (!$license) { |
| 13 | $license = defined('MAILPOET_PREMIUM_LICENSE') ? |
| 14 | MAILPOET_PREMIUM_LICENSE : |
| 15 | false; |
| 16 | } |
| 17 | return $license; |
| 18 | } |
| 19 | |
| 20 | public function hasLicense(): bool { |
| 21 | return (bool)self::getLicense(); |
| 22 | } |
| 23 | } |
| 24 |