woocommerce_download_file_(file_download_method) action-hookWC 1.0

Usage

add_action( 'woocommerce_download_file_(file_download_method)', 'wp_kama_woocommerce_download_file_method_action', 10, 2 );

/**
 * Function for `woocommerce_download_file_(file_download_method)` action-hook.
 * 
 * @param  $file_path 
 * @param  $filename  
 *
 * @return void
 */
function wp_kama_woocommerce_download_file_method_action( $file_path, $filename ){

	// action...
}
$file_path
-
$filename
-

Where the hook is called

WC_Download_Handler::download()
woocommerce_download_file_(file_download_method)
woocommerce/includes/class-wc-download-handler.php 257
do_action( 'woocommerce_download_file_' . $file_download_method, $file_path, $filename );

Where the hook is used in WooCommerce

woocommerce/includes/class-wc-download-handler.php 32
add_action( 'woocommerce_download_file_redirect', array( __CLASS__, 'download_file_redirect' ), 10, 2 );
woocommerce/includes/class-wc-download-handler.php 33
add_action( 'woocommerce_download_file_xsendfile', array( __CLASS__, 'download_file_xsendfile' ), 10, 2 );
woocommerce/includes/class-wc-download-handler.php 34
add_action( 'woocommerce_download_file_force', array( __CLASS__, 'download_file_force' ), 10, 2 );