403Webshell
Server IP : 62.60.133.156  /  Your IP : 216.73.217.51
Web Server : LiteSpeed
System : Linux linux24.centraldnserver.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User : mimradmin ( 1166)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /proc/self/cwd/wp-content/plugins/woocommerce-old/packages/blueprint/src/Steps/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /proc/self/cwd/wp-content/plugins/woocommerce-old/packages/blueprint/src/Steps/ActivatePlugin.php
<?php

namespace Automattic\WooCommerce\Blueprint\Steps;

/**
 * Class ActivatePlugin
 *
 * @package Automattic\WooCommerce\Blueprint\Steps
 */
class ActivatePlugin extends Step {
	/**
	 * The name of the plugin to be activated.
	 *
	 * @var string The name of the plugin to be activated.
	 */
	private string $plugin_name;

	/**
	 * The path to the plugin file relative to the plugins directory.
	 *
	 * @var string  The path to the plugin file relative to the plugins directory.
	 */
	private string $plugin_path;

	/**
	 * ActivatePlugin constructor.
	 *
	 * @param string $plugin_path Path to the plugin file relative to the plugins directory.
	 * @param string $plugin_name The name of the plugin to be activated.
	 */
	public function __construct( $plugin_path, $plugin_name = '' ) {
		$this->plugin_name = $plugin_name;
		$this->plugin_path = $plugin_path;
	}

	/**
	 * Returns the name of this step.
	 *
	 * @return string The step name.
	 */
	public static function get_step_name(): string {
		return 'activatePlugin';
	}

	/**
	 * Returns the schema for the JSON representation of this step.
	 *
	 * @param int $version The version of the schema to return.
	 * @return array The schema array.
	 */
	public static function get_schema( int $version = 1 ): array {
		return array(
			'type'       => 'object',
			'properties' => array(
				'step'       => array(
					'type' => 'string',
					'enum' => array( static::get_step_name() ),
				),
				'pluginName' => array(
					'type' => 'string',
				),
				'pluginPath' => array(
					'type' => 'string',
				),
			),
			'required'   => array( 'step', 'pluginPath' ),
		);
	}

	/**
	 * Prepares an associative array for JSON encoding.
	 *
	 * @return array Array of data to be encoded as JSON.
	 */
	public function prepare_json_array(): array {
		$data = array(
			'step'       => static::get_step_name(),
			'pluginPath' => $this->plugin_path,
		);

		if ( ! empty( $this->plugin_name ) ) {
			$data['pluginName'] = $this->plugin_name;
		}

		return $data;
	}
}

Youez - 2016 - github.com/yon3zu