I have a client who is going to sell downloadable audiofiles with the WooCommerce plugin: The filenames of the audiofiles contains spaces, which is very important for the artist behind the audiofiles. But the spaces have been changed by Wordpress into hyphens when uploaded to the media library. I found the code below and tried adding it to my functions.php to restore the original filenames, but surely something is missing!
What code should I write (and where) to call each ID product number and make the output file name change to the original title of the song? Any help would be appreciated.