{"issue":{"created_at":"2011-11-10T07:14:54Z","state":"closed","updated_at":"2011-11-23T10:57:52Z","user":{"gravatar_id":"ddf97c01b7fe463f3a1a0f23f197fd64","id":880127,"url":"https://api.github.com/users/trains58554","login":"trains58554","avatar_url":"https://secure.gravatar.com/avatar/ddf97c01b7fe463f3a1a0f23f197fd64?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":1,"body":"Hi\r\n\r\nIn the paypal plugin there be the hook for when an item is deleted that way you do not end up with ghost ads.\r\n\r\nI added something like so \r\n\r\nfunction paypal_item_delete($itemId) {\r\n    \t$conn = getConnection();\r\n      $conn->osc_dbExec(\"DELETE FROM %st_paypal_premium WHERE fk_i_item_id = '%d'\", DB_TABLE_PREFIX, $itemId);\r\n      $conn->osc_dbExec(\"DELETE FROM %st_paypal_publish WHERE fk_i_item_id = '%d'\", DB_TABLE_PREFIX, $itemId);\r\n    }\r\n\r\nosc_add_hook('delete_item', 'paypal_item_delete');\r\n\r\nJay","assignee":{"gravatar_id":"1b8217884d085436bbb7d56b96b8570c","id":296442,"url":"https://api.github.com/users/juanramon","login":"juanramon","avatar_url":"https://secure.gravatar.com/avatar/1b8217884d085436bbb7d56b96b8570c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"id":2195442,"labels":[{"name":"paypal","color":"DDDDDD","url":"https://api.github.com/repos/osclass/osclass-plugins/labels/paypal"}],"number":52,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"I have a little update for the paypal plugin","closed_at":"2011-11-23T10:57:51Z","html_url":"https://github.com/osclass/osclass-plugins/issues/52","milestone":null,"url":"https://api.github.com/repos/osclass/osclass-plugins/issues/52"},"action":"closed"}