Problem with item.delete hook
Hi. I've got som problem here. I'm connecting Podio and Mailchimp using both API's. The script fires when something happens in the Podio App. When a new item is created og when an item is updated, the changes are made in the Mailchimp list. This work fine, but when it comes to item.delete something goes wrong. The hook works. When I put a mailfunction right after item.delete case it sends a mail, but when I try to get the variables the item, i'm not getting any. What might cause this problem? My code from the delete.item is here: case 'item.delete': mail('$mymail', "En suscriber er blevet slettet",'Du har slettet: '.$email); $item = PodioItem::get($_POST['item_id']); $field = $item->field('mail'); $email = $field->humanized_value(); $list_id = 'the mailchimp listId' $api_key = "The mailchimp api key"; require('Mailchimp.php'); $Mailchimp = new Mailchimp($api_key); $Mailchimp_Lists = new Mailchimp_Lists($Mailchimp); $subscriber = $Mailchimp_Lists->unsubscribe($api_key,$list_id,$email,true,false,false); // Do something. item_id is available in $_POST['item_id'] } Thanks

This question is closed.