But it depends on a non-existent hook, and at the administrative part (/admin/contexts) where the journal is supposed to be removed, standard plugins are not loaded, so there's no way to listen for the right hook (Context::delete).
The cleanup might be done inside the scheduled task.
Another possibility would be to investigate the behavior of enabling the "site-wide" setting, which would be the only way to get the plugin loaded at the right time.
There's some code to cleanup data here: https://github.com/pkp/pln/blob/49f2b9065b912ffb915c3cf40fb00a1942604276/PLNPlugin.inc.php#L92
But it depends on a non-existent hook, and at the administrative part (
/admin/contexts
) where the journal is supposed to be removed, standard plugins are not loaded, so there's no way to listen for the right hook (Context::delete
).The cleanup might be done inside the scheduled task. Another possibility would be to investigate the behavior of enabling the "site-wide" setting, which would be the only way to get the plugin loaded at the right time.