woocommerce_file_download_filename
Usage
add_filter( 'woocommerce_file_download_filename', 'wp_kama_woocommerce_file_download_filename_filter', 10, 2 ); /** * Function for `woocommerce_file_download_filename` filter-hook. * * @param $filename * @param $product_id * * @return */ function wp_kama_woocommerce_file_download_filename_filter( $filename, $product_id ){ // filter... return $filename; }
- $filename
- -
- $product_id
- -
Where the hook is called
woocommerce_file_download_filename
woocommerce/src/Admin/API/Reports/Downloads/Controller.php 70
$response->data['file_name'] = apply_filters( 'woocommerce_file_download_filename', $filename, $product_id );
woocommerce/includes/class-wc-download-handler.php 241
$filename = apply_filters( 'woocommerce_file_download_filename', $filename, $product_id );