woocommerce_download_file_force

woocommerce_download_file_force

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_download_file_force') is found 1 times:

  • /includes/class-wc-download-handler.php line 347
    		 * 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 );
    

See this hook used in plugins: