WC_Download_Handler::download_file_redirect()public staticWC 1.0

Redirect to a file to start the download.

Method of the class: WC_Download_Handler{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = WC_Download_Handler::download_file_redirect( $file_path, $filename );
$file_path(string) (required)
File path.
$filename(string)
File name.
Default: ''

WC_Download_Handler::download_file_redirect() code WC 8.7.0

public static function download_file_redirect( $file_path, $filename = '' ) {
	header( 'Location: ' . $file_path );
	exit;
}