Main Menu
Sub Menu

create_package_frontend

create_package_frontend action is triggered whenever a package is published from front-end. You can use this to take any action when a user adds a package from front-end.

Example

The example below will send an email to the site admin when any site member publishes a download manager package from front-end.

 

<?php
function notify_admin($package_id, $package){
 $edit = "<a href='".get_edit_post_link( $package_id)."'>Edit Package</a><br/>"; 
 $view = "<a href='".get_permalink( $package_id )."'>Edit Package</a><br/>";
 $message = "Package Title: {$package->post_title}<br/>
{$view}<br/>
{$edit}";
 wp_mail(get_option("admin_email"), "New Package Added", $message, "From: no-reply@sitenamernContent-type: text/htmlrn"); 
}

add_action("create_package_frontend", "notify_admin", 10, 2);
?>
Last updated on Apr 12, 2017

Need More Clarification?

For any technical issue, if you are already using pro version please post in pro forum and free version users please post in free forum. Otherwise, if you have any pre-sale or order related query please contact live chat support team. For technical support.

Need Customization?

If you need additional customization on WordPress Download Manager or any type of custom support on WordPress you may contact our customization service.