Automattic\WooCommerce\Admin

ReportCSVExporter::set_download_suffix │ public │ WC 11.2.0

Add detail to the name the export is downloaded as, leaving the stored file's name alone.

Lets a download say what the report covers, such as the date range, when the stored name only identifies the export.

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

Хуков нет.

Возвращает

void. Ничего (null).

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

$ReportCSVExporter = new ReportCSVExporter();
$ReportCSVExporter->set_download_suffix( $suffix );
$suffix(строка) (обязательный)
Detail to append to the download's name, e.g. a date range.

Список изменений

С версии 11.2.0 Введена.

Код ReportCSVExporter::set_download_suffix() WC 11.2.1

public function set_download_suffix( $suffix ) {
	$this->download_suffix = sanitize_file_name( $suffix );
}