HEX
Server: nginx/1.27.1
System: Linux in-4 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User: ilikadirect (1186)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v6964/testingff/public_html/fdfctr/wp-content/plugins/site-reviews/plugin/License.php
<?php

namespace GeminiLabs\SiteReviews;

use GeminiLabs\SiteReviews\Addons\Updater;

class License
{
    public function status(): array
    {
        $isFree = true; // priority 1
        $isValid = true; // priority 2
        $isSaved = true; // priority 3
        foreach (glsr()->updated as $addonId => $addon) {
            if (!$addon['licensed']) {
                continue; // this is a free addon
            }
            $isFree = false; // there are premium addons installed
            if (empty(glsr_get_option('licenses.'.$addonId))) {
                $isSaved = false;
                continue; // the license has not been saved in the settings
            }
            $licenseStatus = get_option(glsr()->prefix.$addonId);
            if (empty($licenseStatus)) { // the license status has not been stored
                $license = glsr_get_option('licenses.'.$addonId);
                $updater = new Updater($addon['updateUrl'], $addon['file'], $addonId, compact('license'));
                if (!$updater->isLicenseValid()) {
                    $isValid = false;
                    break;
                }
            }
        }
        return compact('isFree', 'isSaved', 'isValid');
    }
}