WooCommerce Code Reference

WC_WCCOM_Site_Installation_State
in package

WC_WCCOM_Site_Installation_State class

Table of Contents

STEP_STATUS_COMPLETED  = 'completed'
STEP_STATUS_FAILED  = 'failed'
STEP_STATUS_IN_PROGRESS  = 'in-progress'
$already_installed_plugin_info  : array<string|int, mixed>
The plugin info for the already installed plugin.
$download_path  : string
The path to the downloaded file.
$download_url  : string
The product slug.
$idempotency_key  : string
The idempotency key.
$installed_path  : string
The path to the installed file.
$last_step_error  : string
The last step error.
$last_step_name  : string
The last step name.
$last_step_status  : string
The last step status.
$product_id  : string
The product ID.
$product_name  : string
The product name.
$product_type  : string
The product type.
$started_date  : int
The timestamp of the installation start.
$unpacked_path  : string
The path to the unpacked file.
capture_failure()  : mixed
Capture an installation failure.
complete_step()  : mixed
Capture a successful installation of a step.
get_already_installed_plugin_info()  : array<string|int, mixed>
Get the plugin info for the already installed plugin.
get_download_path()  : string
Get the path to the downloaded file.
get_download_url()  : string
Get the download URL.
get_idempotency_key()  : string
Get the idempotency key.
get_installed_path()  : string
Get the path to the installed file.
get_last_step_error()  : int
Get the last step error.
get_last_step_name()  : int
Get the timestamp of the installation start.
get_last_step_status()  : string
Get the last step status.
get_product_id()  : string
Get the product ID.
get_product_name()  : string
Get the product name.
get_product_type()  : string
Get the product type.
get_started_date()  : int
Get the timestamp of the installation start.
get_unpacked_path()  : string
Get the path to the unpacked file.
initiate_existing()  : WC_WCCOM_Site_Installation_State
Initiate an existing installation state.
initiate_new()  : WC_WCCOM_Site_Installation_State
Initiate a new installation state.
initiate_step()  : void
Initiate a step.
set_already_installed_plugin_info()  : mixed
Set the plugin info for the already installed plugin.
set_download_path()  : mixed
Set the path to the downloaded file.
set_download_url()  : mixed
Set the download URL.
set_installed_path()  : mixed
Set the path to the installed file.
set_product_name()  : mixed
Set the product name.
set_product_type()  : mixed
Set the product type.
set_unpacked_path()  : mixed
Set the path to the unpacked file.
__construct()  : mixed
Constructor.

Constants

Properties

Methods

initiate_existing()

Initiate an existing installation state.

public static initiate_existing(int $product_id, string $idempotency_key, string $last_step_name, string $last_step_status, string $last_step_error, int $started_date) : WC_WCCOM_Site_Installation_State
Parameters
$product_id : int

The product ID.

$idempotency_key : string

The idempotency key.

$last_step_name : string

The last step name.

$last_step_status : string

The last step status.

$last_step_error : string

The last step error.

$started_date : int

The timestamp of the installation start.

Return values
WC_WCCOM_Site_Installation_StateThe instance.