woocommerce_use_xsendfile_for_remote filter-hookWC 1.0

Fallback on force download method for remote files. This is because:

  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.

Usage

add_filter( 'woocommerce_use_xsendfile_for_remote', 'wp_kama_woocommerce_use_xsendfile_for_remote_filter' );

/**
 * Function for `woocommerce_use_xsendfile_for_remote` filter-hook.
 * 
 * @param  $false 
 *
 * @return 
 */
function wp_kama_woocommerce_use_xsendfile_for_remote_filter( $false ){

	// filter...
	return $false;
}
$false
-

Where the hook is called

WC_Download_Handler::download_file_xsendfile()
woocommerce_use_xsendfile_for_remote
woocommerce/includes/class-wc-download-handler.php 346
if ( $parsed_file_path['remote_file'] && ! apply_filters( 'woocommerce_use_xsendfile_for_remote', false ) ) {

Where the hook is used in WooCommerce

Usage not found.