woocommerce_download_file_force, $file_path, $filename
woocommerce_download_file_force, $file_path, $filename
Appears in: woocommerce.11.0.0
Hook Type: action
Displaying hooks found in version: woocommerce.11.0.0do_action('woocommerce_download_file_force, $file_path, $filename') is found 1 times:
- /includes/class-wc-download-handler.php line 360
* 1. xsendfile needs proxy configuration to work for remote files, which cannot be assumed to be available on most hosts. * 2. Force download method is more secure than redirect method if `allow_url_fopen` is enabled in `php.ini`. */ if ( $parsed_file_path['remote_file'] && ! apply_filters( 'woocommerce_use_xsendfile_for_remote', false ) ) { do_action( 'woocommerce_download_file_force', $file_path, $filename ); return; } if ( function_exists( 'apache_get_modules' ) && in_array( 'mod_xsendfile', apache_get_modules(), true ) ) { self::download_headers( $parsed_file_path['file_path'], $filename ); $filepath = apply_filters( 'woocommerce_download_file_xsendfile_file_path', $parsed_file_path['file_path'], $file_path, $filename, $parsed_file_path );