Uname:Linux ip-11-115-0-196 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 10:54:48 UTC 2025 x86_64

403WebShell
403Webshell
Server IP : 13.126.101.145  /  Your IP : 216.73.216.63
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ip-11-115-0-196 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 10:54:48 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.3.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/rentals_updated/wp-content/plugins/woo-preview-emails/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/rentals_updated/wp-content/plugins/woo-preview-emails/includes/Bootstrap.php
<?php

namespace Codemanas\WooPreviewEmails;

class Bootstrap {
	public static ?Bootstrap $instance = null;
	private static $active_plugins;
	public static function get_instance(): ?Bootstrap {
		return is_null( self::$instance ) ? ( self::$instance = new self() ) : self::$instance;
	}

	public function __construct() {
		$this->load_dependencies();
		add_action( 'plugins_loaded', [ $this, 'init_plugin' ] );
		add_action( 'init', [ $this, 'load_text_domain' ] );
	}

	public static function init() {
		self::$active_plugins = (array) get_option( 'active_plugins', array() );
		if ( is_multisite() )
			self::$active_plugins = array_merge( self::$active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
	}

	/**
	 * @return bool
	 */
	public static function woocommerce_active_check(): bool {
		if ( ! self::$active_plugins ) self::init();
		return in_array( 'woocommerce/woocommerce.php', self::$active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', self::$active_plugins );
	}

	public function load_text_domain() {
		load_plugin_textdomain( 'woo-preview-emails', false, plugin_basename( WOO_PREVIEW_EMAILS_DIR ) . '/languages/' );
	}

	public function init_plugin() {
		if( self::woocommerce_active_check() ){
			Main::get_instance();
			AjaxHandler::get_instance();
		}
	}

	private function load_dependencies() {
		require_once WOO_PREVIEW_EMAILS_DIR . '/vendor/autoload.php';
	}
}

Bootstrap::get_instance();

Youez - 2016 - github.com/yon3zu
LinuXploit