WC_Download_Handler::download_file_redirect()
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() WC Download Handler::download file redirect code WC 9.4.2
public static function download_file_redirect( $file_path, $filename = '' ) { header( 'Location: ' . $file_path ); exit; }