after_add_package” is an action triggered whenever a package is created. This can be used to do some extra functions immediately after creating a package from front-end or back-end. For example you may want to send email notification after a package is created.



function wpdm_new_download_notification($package){

// package is an array with all package data, try
// print_r($package);
//to do: write your notification code here


add_action("after_add_package", "wpdm_new_download_notification");