Automattic\WooCommerce\Admin

ReportExporter::update_export_percentage_complete()public staticWC 1.0

Update the completion percentage of a report export.

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

No Hooks.

Return

null. Nothing.

Usage

$result = ReportExporter::update_export_percentage_complete( $report_type, $export_id, $percentage );
$report_type(string) (required)
Report type. E.g. 'customers'.
$export_id(string) (required)
Unique ID for report (timestamp expected).
$percentage(int) (required)
Completion percentage.

Code of ReportExporter::update_export_percentage_complete() WC 7.1.0

public static function update_export_percentage_complete( $report_type, $export_id, $percentage ) {
	$exports_status = get_option( self::EXPORT_STATUS_OPTION, array() );
	$status_key     = self::get_status_key( $report_type, $export_id );

	$exports_status[ $status_key ] = $percentage;

	update_option( self::EXPORT_STATUS_OPTION, $exports_status );
}