WooCommerce Code Reference

ReportsSync
in package

ReportsSync Class.

Table of Contents

clear_queued_actions()  : mixed
Clears all queued actions.
clear_stock_count_cache()  : mixed
Clear the count cache when products are added or updated, or when the no/low stock options are changed.
delete_report_data()  : string
Delete all data for reports.
get_import_stats()  : array<string|int, mixed>
Get stats for current import.
get_import_totals()  : array<string|int, mixed>
Get the import totals for all syncs.
get_schedulers()  : array<string|int, mixed>
Get classes for syncing data.
init()  : mixed
Hook in sync methods.
is_importing()  : bool
Returns true if an import is in progress.
regenerate_report_data()  : string
Regenerate data for reports.
reset_import_stats()  : mixed
Update the import stat totals and counts.

Methods

clear_queued_actions()

Clears all queued actions.

public static clear_queued_actions() : mixed
Return values
mixed

clear_stock_count_cache()

Clear the count cache when products are added or updated, or when the no/low stock options are changed.

public static clear_stock_count_cache(int $id) : mixed
Parameters
$id : int

Post/product ID.

Return values
mixed

delete_report_data()

Delete all data for reports.

public static delete_report_data() : string
Return values
string

get_import_stats()

Get stats for current import.

public static get_import_stats() : array<string|int, mixed>
Return values
array<string|int, mixed>

get_import_totals()

Get the import totals for all syncs.

public static get_import_totals(int|bool $days, bool $skip_existing) : array<string|int, mixed>
Parameters
$days : int|bool

Number of days to import.

$skip_existing : bool

Skip existing records.

Return values
array<string|int, mixed>

get_schedulers()

Get classes for syncing data.

public static get_schedulers() : array<string|int, mixed>
Tags
throws
Exception

Throws exception when invalid data is found.

Return values
array<string|int, mixed>

is_importing()

Returns true if an import is in progress.

public static is_importing() : bool
Return values
bool

regenerate_report_data()

Regenerate data for reports.

public static regenerate_report_data(int|bool $days, bool $skip_existing) : string
Parameters
$days : int|bool

Number of days to import.

$skip_existing : bool

Skip existing records.

Return values
string

reset_import_stats()

Update the import stat totals and counts.

public static reset_import_stats(int|bool $days, bool $skip_existing) : mixed
Parameters
$days : int|bool

Number of days to import.

$skip_existing : bool

Skip existing records.

Return values
mixed