PHP 8.0.30
Preview: Updates.php Size: 1.54 KB
//home/certprox/template.certproxywizard.com/wp-content/plugins/hostinger-easy-onboarding/includes/Updates.php

<?php
namespace Hostinger\EasyOnboarding;

use Hostinger\EasyOnboarding\Config;
use YahnisElsts\PluginUpdateChecker\v5\PucFactory;

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

class Updates {
    private const DEFAULT_PLUGIN_UPDATE_URI = 'https://wp-update.hostinger.io/?action=get_metadata&slug=hostinger-easy-onboarding';
    private const CANARY_PLUGIN_UPDATE_URI  = 'https://wp-update-canary.hostinger.io/?action=get_metadata&slug=hostinger-easy-onboarding';
    private const STAGING_PLUGIN_UPDATE_URI = 'https://wp-update-stage.hostinger.io/?action=get_metadata&slug=hostinger-easy-onboarding';

    public function __construct() {
        $this->updates();
    }

    /**
     * @return string
     */
    private function get_plugin_update_uri(): string {
        if ( isset( $_SERVER['H_STAGING'] ) && filter_var( $_SERVER['H_STAGING'], FILTER_VALIDATE_BOOLEAN ) === true ) {
            return self::STAGING_PLUGIN_UPDATE_URI;
        }

        if ( isset( $_SERVER['H_CANARY'] ) && filter_var( $_SERVER['H_CANARY'], FILTER_VALIDATE_BOOLEAN ) === true ) {
            return self::CANARY_PLUGIN_UPDATE_URI;
        }

        return self::DEFAULT_PLUGIN_UPDATE_URI;
    }

    /**
     * @return void
     */
    public function updates(): void {
        $plugin_updater_uri = $this->get_plugin_update_uri();

        if ( class_exists( PucFactory::class ) ) {
            $hts_update_checker = PucFactory::buildUpdateChecker( $plugin_updater_uri, HOSTINGER_EASY_ONBOARDING_ABSPATH . 'hostinger-easy-onboarding.php', 'hostinger-easy-onboarding' );
        }
    }
}

Directory Contents

Dirs: 8 × Files: 14

Name Size Perms Modified Actions
Admin DIR
- drwxr-xr-x 2026-06-14 00:11:45
Edit Download
- drwxr-xr-x 2026-06-14 00:11:45
Edit Download
Cli DIR
- drwxr-xr-x 2026-06-14 00:11:45
Edit Download
Dto DIR
- drwxr-xr-x 2026-06-14 00:11:45
Edit Download
Preview DIR
- drwxr-xr-x 2026-06-14 00:11:45
Edit Download
Requests DIR
- drwxr-xr-x 2026-06-14 00:11:45
Edit Download
Rest DIR
- drwxr-xr-x 2026-06-14 00:11:45
Edit Download
- drwxr-xr-x 2026-06-14 00:11:45
Edit Download
811 B lrw-r--r-- 2026-06-10 16:30:23
Edit Download
3.33 KB lrw-r--r-- 2026-06-10 16:30:23
Edit Download
737 B lrw-r--r-- 2026-06-10 16:30:23
Edit Download
869 B lrw-r--r-- 2026-06-10 16:30:23
Edit Download
151 B lrw-r--r-- 2026-06-10 16:30:23
Edit Download
912 B lrw-r--r-- 2026-06-10 16:30:23
Edit Download
975 B lrw-r--r-- 2026-06-10 16:30:23
Edit Download
1.23 KB lrw-r--r-- 2026-06-10 16:30:23
Edit Download
17.63 KB lrw-r--r-- 2026-06-10 16:30:23
Edit Download
11.41 KB lrw-r--r-- 2026-06-10 16:30:23
Edit Download
419 B lrw-r--r-- 2026-06-10 16:30:23
Edit Download
1.77 KB lrw-r--r-- 2026-06-10 16:30:23
Edit Download
2.62 KB lrw-r--r-- 2026-06-10 16:30:23
Edit Download
1.54 KB lrw-r--r-- 2026-06-10 16:30:23
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).