WC_WCCOM_Site_Installation_State_Storage
in package
WC_WCCOM_Site_Installation_State_Storage class
Table of Contents
- delete_state() : bool
- Delete state from storage.
- get_state() : WC_WCCOM_Site_Installation_State|null
- Get state from storage.
- save_state() : bool
- Save state to storage.
- get_storage_key() : string
- Get the storage key for a product ID.
Methods
delete_state()
Delete state from storage.
public
static delete_state(WC_WCCOM_Site_Installation_State $state) : bool
Parameters
- $state : WC_WCCOM_Site_Installation_State
-
The state to delete.
Return values
bool —get_state()
Get state from storage.
public
static get_state(int $product_id) : WC_WCCOM_Site_Installation_State|null
Parameters
- $product_id : int
-
The product ID.
Return values
WC_WCCOM_Site_Installation_State|null —save_state()
Save state to storage.
public
static save_state(WC_WCCOM_Site_Installation_State $state) : bool
Parameters
- $state : WC_WCCOM_Site_Installation_State
-
The state to save.
Return values
bool —get_storage_key()
Get the storage key for a product ID.
protected
static get_storage_key(int $product_id) : string
Parameters
- $product_id : int
-
The product ID.