osclass/osclass-plugins — Issue #52: I have a little update for the paypal plugin
Author: trains58554
Created: 2011-11-10 07:14:54+00:00
State: open

Hi

In the paypal plugin there be the hook for when an item is deleted that way you do not end up with ghost ads.

I added something like so

function paypal_item_delete($itemId) {
$conn = getConnection();
$conn->osc_dbExec("DELETE FROM %st_paypal_premium WHERE fk_i_item_id = '%d'", DB_TABLE_PREFIX, $itemId);
$conn->osc_dbExec("DELETE FROM %st_paypal_publish WHERE fk_i_item_id = '%d'", DB_TABLE_PREFIX, $itemId);
}

osc_add_hook('delete_item', 'paypal_item_delete');

Jay