WooCommerce Code Reference

ActivatePlugin extends Step

Class ActivatePlugin

Table of Contents

$meta_values  : array<string|int, mixed>
Meta values for the step.
$plugin_name  : string
The name of the plugin to be activated.
$plugin_path  : string
The path to the plugin file relative to the plugins directory.
__construct()  : mixed
ActivatePlugin constructor.
get_json_array()  : mixed
Get the JSON array for the step.
get_schema()  : array<string|int, mixed>
Returns the schema for the JSON representation of this step.
get_step_name()  : string
Returns the name of this step.
prepare_json_array()  : array<string|int, mixed>
Prepares an associative array for JSON encoding.
set_meta_values()  : void
Set meta values for the step.

Properties

Methods

__construct()

ActivatePlugin constructor.

public __construct(string $plugin_path[, string $plugin_name = '' ]) : mixed
Parameters
$plugin_path : string

Path to the plugin file relative to the plugins directory.

$plugin_name : string = ''

The name of the plugin to be activated.

Return values
mixed

get_schema()

Returns the schema for the JSON representation of this step.

public static get_schema([int $version = 1 ]) : array<string|int, mixed>
Parameters
$version : int = 1

The version of the schema to return.

Return values
array<string|int, mixed>The schema array.

prepare_json_array()

Prepares an associative array for JSON encoding.

public prepare_json_array() : array<string|int, mixed>
Return values
array<string|int, mixed>Array of data to be encoded as JSON.

set_meta_values()

Set meta values for the step.

public set_meta_values(array<string|int, mixed> $meta_values) : void
Parameters
$meta_values : array<string|int, mixed>

The meta values.

Return values
void