Automattic\WooCommerce\Admin
ReportExporter::delete_export_status
Delete the stored progress of an export whose file has been deleted.
Метод класса: ReportExporter{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
$result = ReportExporter::delete_export_status( $path );
- $path(строка) (обязательный)
- Path of the deleted export body or its
.headerscompanion.
Код ReportExporter::delete_export_status() ReportExporter::delete export status 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 );
}
}