Hello,
I’m not quite sure on how to do that. I would like to send an email (wp_mail()) with a direct link to the .pdf file (only one file in a package) and also attach that .pdf to the email.
However, that should only happen if the uploaded package is a specific category (category XYZ). So, right now I am using save_post_wpdmpro and check the wpdm_get_package(post_ID) for the cats_class. There I have the category string I am looking for. That all works. I get the correct link in the email and everything is fine.
However I cannot seem to figure out how to attach the file. How to get the specific file in this context oder in your mentioned filter?