woocommerce_file_download_filename, $filename, $product_id
woocommerce_file_download_filename, $filename, $product_id
Appears in: woocommerce.11.0.0
Hook Type: filter
Displaying hooks found in version: woocommerce.11.0.0apply_filters('woocommerce_file_download_filename, $filename, $product_id') is found 2 times:
- /includes/class-wc-download-handler.php line 240
if ( strstr( $filename, '?' ) ) { $filename = current( explode( '?', $filename ) ); } $filename = apply_filters( 'woocommerce_file_download_filename', $filename, $product_id ); /** * Filter download method. * * @since 4.5.0 * @param string $method Download method. - /src/Admin/API/Reports/Downloads/Controller.php line 70
// Make sure the product hasn't been deleted. if ( $_product ) { $file_path = $_product->get_file_download_path( $report['download_id'] ); $filename = basename( $file_path ); $response->data['file_name'] = apply_filters( 'woocommerce_file_download_filename', $filename, $product_id ); $response->data['file_path'] = $file_path; } else { $response->data['file_name'] = ''; $response->data['file_path'] = ''; }