Description


This hook is triggered after editing a package from front end. If you want to notify admin after editing a package from front end, you can use this hook.

Parameters


Two arguments are passed to this hook.

Usage


<?php add_action('edit_package_frontend','notify_admin',10,2); ?>

Examples


<?php
add_action('edit_package_frontend','notify_admin',10,2);
function notify_admin($package_id, $package_data){
 $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_data->post_title}<br/>
{$view}<br/>
{$edit}";
 wp_mail(get_option("admin_email"), "New Package Added", $message, "From: no-reply@sitename\r\nContent-type: text/html\r\n"); 
}

?>

Related


Last Updated: Jun 29, 2014


Leave a Reply