HEX
Server: Apache/2
System: Linux server1c 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64
User: jandjware (1008)
PHP: 8.2.23
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/jandjware/public_html/wp-content/plugins/hostinger/includes/Mcp/Handlers/WebsiteUpdated.php
<?php

namespace Hostinger\Mcp\Handlers;


use Hostinger\Admin\Jobs\ActionScheduler;

defined( 'ABSPATH' ) || exit;
class WebsiteUpdated extends EventHandler {

    const MCP_SITE_TRANSIENT          = 'hostinger_mcp_site_status';
    const MCP_SITE_TRANSIENT_LIFETIME = 1200; // 20 mins

    public function send( array $args = array() ): void {
        if ( ! $this->can_send( $args ) ) {
            return;
        }

        $status = ActionScheduler::STATUS_FAILED;

        if ( $this->send_to_proxy( $args ) ) {
            $status = ActionScheduler::STATUS_COMPLETE;
        }

        set_transient( self::MCP_SITE_TRANSIENT, $status, self::MCP_SITE_TRANSIENT_LIFETIME );
    }

    public function can_send( array $args = array() ): bool {
        return parent::can_send( $args ) && get_transient( self::MCP_SITE_TRANSIENT ) !== ActionScheduler::STATUS_COMPLETE;
    }
}