Hey,
Our subscriber list is sensitive and stored in a separate system.
When sending out newsletters, we import all subscribers, send the newsletter, delete the subscribers.
Recently we noticed that deleting a subscriber will break all links in the already sent-out email!
The responsible code is in statistics/statistics.php:
if ($user_id) {
$user = Newsletter::instance()->get_user($user_id);
if (!$user) {
$this->dienow(__('Subscriber not found', 'newsletter'), 'This tracking link contains a reference to a subscriber no more present', 404);
}
}
Instead of returning an error, could we make it so that the link still works please? Here’s my suggestion:
if ($user_id) {
$user = Newsletter::instance()->get_user($user_id);
if (!$user) {
header('Location: ' . apply_filters('newsletter_redirect_url', $url, $email, $user));
die();
}
}
Thanks