woocommerce_file_download_filename

woocommerce_file_download_filename

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_file_download_filename') is found 2 times:

  • /includes/class-wc-download-handler.php line 241
    		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'] = '';
    		}