HEX
Server: Apache
System: Linux p3plzcpnl503801.prod.phx3.secureserver.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User: aqo14e2iyyd9 (9667755)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/aqo14e2iyyd9/public_html/wp-content/plugins/wpforms/src/Pro/LicenseApi/PluginUpdateCache.php
<?php

namespace WPForms\Pro\LicenseApi;

/**
 * License api plugin update cache.
 *
 * @see LicenseApiCache
 *
 * @since 1.8.7
 */
class PluginUpdateCache extends LicenseApiCache {

	/**
	 * Encrypt cached file.
	 *
	 * @since 1.8.7
	 */
	const ENCRYPT = true;

	/**
	 * A class id or array of cache class ids to sync updates with.
	 *
	 * @since 1.8.9
	 */
	const SYNC_WITH = 'license_api_plugin_info_cache';

	/**
	 * Expirable URL key.
	 *
	 * @since 1.8.7
	 *
	 * @var string|bool
	 */
	protected $expirable_url_key = 'package';

	/**
	 * Constructor.
	 *
	 * @since 1.8.7
	 */
	public function __construct() {

		$this->plugin_slug = 'wpforms-pro';
		$this->type        = 'plugin-update';
	}

	/**
	 * Initialize.
	 *
	 * @since 1.8.7
	 */
	public function init() {

		parent::init();

		// if this is GET force-check=1 set and $this->type is plugin-update, then Invalidate cache.
		// phpcs:ignore WordPress.Security.NonceVerification.Recommended
		if ( isset( $_GET['force-check'] ) && $_GET['force-check'] === '1' ) {
			$this->invalidate_cache();
		}
	}
}