HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home/karalev/www/wp-content/plugins/wp-whatsapp/includes/Plugin.php
<?php
namespace NTA_WhatsApp;

use FileBirdCross;

defined( 'ABSPATH' ) || exit;
class Plugin {
	protected static $instance = null;

	public static function getInstance() {
		if ( null === self::$instance ) {
			self::$instance = new self();
		}

		return self::$instance;
	}

	private function __construct() {
	}

	public static function activate() {
		$firstTimeActive = get_option( 'njt_wa_first_time_active' );
		if ( $firstTimeActive === false ) {
			$waReview = \NJTWhatsAppReview::get_instance( 'njt_wa', 'WhatsApp Plugin', 'wp-whatsapp' );
			$waReview->need_update_option( 1 ); // 1 day
			update_option( 'njt_wa_first_time_active', 1 );
		}

		$currentVersion = get_option( 'njt_wa_version' );
		if ( version_compare( NTA_WHATSAPP_VERSION, $currentVersion, '>' ) ) {
			$filebirdCross = \FileBirdCross::get_instance( 'filebird', 'filebird+ninjateam', NTA_WHATSAPP_PLUGIN_URL, array( 'filebird/filebird.php', 'filebird-pro/filebird.php' ) );
			$filebirdCross->need_update_option();

			if ( $firstTimeActive !== false ) {
				$waReview = \NJTWhatsAppReview::get_instance( 'njt_wa', 'WhatsApp Plugin', 'wp-whatsapp' );
				$waReview->need_update_option( 7 ); // 1 day
			}

			update_option( 'njt_wa_version', NTA_WHATSAPP_VERSION );
		}
	}

	public static function deactivate() {
	}
}