I offer downloadable products with woocommerce and each product is allowed to have multiple files.
I would like to display the file types/formats on the product page so users know what each product contains. Please see the image below.
One idea I have thought of is to get the names of the attached files, and then somehow print only the last four characters of each one. But I cannot figure out how to write a function that would make it work.