Automattic\WooCommerce\Admin
ReportExporter::delete_export_status
Delete the stored progress of an export whose file has been deleted.
Method of the class: ReportExporter{}
No Hooks.
Returns
void. Nothing (null).
Usage
$result = ReportExporter::delete_export_status( $path );
- $path(string) (required)
- Path of the deleted export body or its
.headerscompanion.
ReportExporter::delete_export_status() ReportExporter::delete export status code WC 11.3.0
private static function delete_export_status( $path ) {
$filename = basename( $path );
if ( preg_match( '/^wc-(.+?)-report-export-(.+)\.csv(?:\.headers)?$/', $filename, $matches ) ) {
$option_name = self::get_status_option_name( $matches[1], $matches[2] );
delete_option( $option_name );
}
}