woocommerce_download_file_(file_download_method) action-hook . WC 1.0
Trigger download via one of the methods.
Usage
add_action( 'woocommerce_download_file_(file_download_method)', 'action_function_name_6154', 10, 2 ); function action_function_name_6154( $file_path, $filename ){ // action... }
- $file_path
- -
- $filename
- -
Where the hook is called
woocommerce_download_file_(file_download_method)
woocommerce/includes/class-wc-download-handler.php 234
do_action( 'woocommerce_download_file_' . $file_download_method, $file_path, $filename );
Where in WP core the hook is used WooCommerce
woocommerce/includes/class-wc-download-handler.php 25
add_action( 'woocommerce_download_file_redirect', array( __CLASS__, 'download_file_redirect' ), 10, 2 );
woocommerce/includes/class-wc-download-handler.php 26
add_action( 'woocommerce_download_file_xsendfile', array( __CLASS__, 'download_file_xsendfile' ), 10, 2 );
woocommerce/includes/class-wc-download-handler.php 27
add_action( 'woocommerce_download_file_force', array( __CLASS__, 'download_file_force' ), 10, 2 );