Status
Manages the import process status tracking and logging system for BigCommerce imports.
This class maintains two logs: current and previous import statuses, storing timestamps and state transitions throughout the import process. It uses WordPress options to persist the status information without caching.
The class defines various status constants representing different stages of the import process, from initialization to completion, including product fetching, category updates, brand management, and image processing.
- Full name:
\BigCommerce\Import\Runner\Status
Constants
| Constant | Visibility | Type | Value |
|---|---|---|---|
NOT_STARTED | public | ’not_started’ | |
STARTED | public | ’started’ | |
ABORTED | public | ’aborted’ | |
FETCHING_LISTINGS | public | ’fetching_listings’ | |
FETCHED_LISTINGS | public | ’fetched_listings’ | |
INITIALIZING_CHANNEL | public | ’initializing_channel’ | |
INITIALIZED_CHANNEL | public | ’initialized_channel’ | |
FETCHING_PRODUCTS | public | ’fetching_products’ | |
FETCHED_PRODUCTS | public | ’fetched_products’ | |
MARKING_DELETED_PRODUCTS | public | ’marking_deleted_products’ | |
MARKED_DELETED_PRODUCTS | public | ’marked_deleted_products’ | |
PROCESSING_QUEUE | public | ’processing_queue’ | |
PROCESSED_QUEUE | public | ’processed_queue’ | |
CLEANING_PRODUCTS | public | ’cleaning_products’ | |
CLEANED_PRODUCTS | public | ’cleaned_products’ | |
FETCHING_STORE | public | ’fetching_store’ | |
FETCHED_STORE | public | ’fetched_store’ | |
FETCHING_CURRENCIES | public | ’fetching_currencies’ | |
FETCHED_CURRENCIES | public | ’fetched_currencies’ | |
CLEANING | public | ’cleaning’ | |
COMPLETED | public | ’completed’ | |
FAILED | public | ’failed’ | |
UPDATING_CATEGORIES | public | ’updating_categories’ | |
UPDATED_CATEGORIES | public | ’updated_categories’ | |
UPDATING_BRANDS | public | ’updating_brands’ | |
UPDATED_BRANDS | public | ’updated_brands’ | |
PURGING_CATEGORIES | public | ’purging_categories’ | |
PURGED_CATEGORIES | public | ’purged_categories’ | |
PURGING_BRANDS | public | ’purging_brands’ | |
PURGED_BRANDS | public | ’purged_brands’ | |
RESIZING_IMAGES | public | ’resizing_images’ | |
RESIZED_IMAGES | public | ’resized_images’ | |
CURRENT_LOG | public | ’bigcommerce_current_import_status_log’ | |
PREVIOUS_LOG | public | ’bigcommerce_previous_import_status_log’ |
Methods
current_status
public current_status(): arrayReturn Value:
The timestamp and status of the last update to the current import
previous_status
public previous_status(): arrayReturn Value:
The timestamp and status of the last update to the previous import
set_status
Add a status to the log for the current import. The status will be appended to the log, even if it is the same as the current status.
public set_status(string $status): voidParameters:
| Parameter | Type | Description |
|---|---|---|
$status | string |
rotate_logs
Overwrite the previous log with the current log and empty the current log
public rotate_logs(): voidInherited methods
get_option
protected get_option(string $option, bool $default = false): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$option | string | |
$default | bool |
update_option
protected update_option(string $option, mixed $value, bool $autoload = false): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$option | string | |
$value | mixed | |
$autoload | bool |
add_option
protected add_option(string $option, mixed $value, bool $autoload = false): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$option | string | |
$value | mixed | |
$autoload | bool |
delete_option
protected delete_option(string $option): boolParameters:
| Parameter | Type | Description |
|---|---|---|
$option | string |
Automatically generated on 2025-01-21