WordPress at a glance
function is not described

Automattic\WooCommerce\Admin

ReportsSync::regenerate_report_data() public WC 1.0

Regenerate data for reports.

{} It's a method of the class: ReportsSync{}

Return

String. Nothing.

Usage

$result = ReportsSync::regenerate_report_data( $days, $skip_existing );
$days(int|true|false) (required)
Number of days to import.
$skip_existing(true|false) (required)
Skip exisiting records.

Code of ReportsSync::regenerate_report_data() WC 5.3.0

<?php
public static function regenerate_report_data( $days, $skip_existing ) {
	if ( self::is_importing() ) {
		return new \WP_Error( 'wc_admin_import_in_progress', __( 'An import is already in progress.  Please allow the previous import to complete before beginning a new one.', 'woocommerce' ) );
	}

	self::reset_import_stats( $days, $skip_existing );
	foreach ( self::get_schedulers() as $scheduler ) {
		$scheduler::schedule_action( 'import_batch_init', array( $days, $skip_existing ) );
	}

	/**
	 * Fires when report data regeneration begins.
	 *
	 * @param int|bool $days Number of days to import.
	 * @param bool     $skip_existing Skip exisiting records.
	 */
	do_action( 'woocommerce_analytics_regenerate_init', $days, $skip_existing );

	return __( 'Report table data is being rebuilt.  Please allow some time for data to fully populate.', 'woocommerce' );
}