Automattic\WooCommerce\Admin

ReportsSync::get_import_totals()public staticWC 1.0

Get the import totals for all syncs.

Метод класса: ReportsSync{}

Хуков нет.

Возвращает

Массив.

Использование

$result = ReportsSync::get_import_totals( $days, $skip_existing );
$days(int|true|false) (обязательный)
Number of days to import.
$skip_existing(true|false) (обязательный)
Skip existing records.

Код ReportsSync::get_import_totals() WC 9.4.2

public static function get_import_totals( $days, $skip_existing ) {
	$totals = array();

	foreach ( self::get_schedulers() as $scheduler ) {
		$items                       = $scheduler::get_items( 1, 1, $days, $skip_existing );
		$totals[ $scheduler::$name ] = $items->total;
	}

	return $totals;
}