Automattic\WooCommerce\Blueprint\Steps

ActivatePlugin::prepare_json_arraypublicWC 1.0

Prepares an associative array for JSON encoding.

Method of the class: ActivatePlugin{}

No Hooks.

Returns

Array. Array of data to be encoded as JSON.

Usage

$ActivatePlugin = new ActivatePlugin();
$ActivatePlugin->prepare_json_array(): array;

ActivatePlugin::prepare_json_array() code WC 9.9.5

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;
}