Prevent re-activation of unsubscribed users
-
This plugin is neat and simple in a very useful way, however there’s one critical bug that prevents me from using it in our live WooCommerse store: if a customer who has already unsubscribed from Sendy completes another purchase from our store, this plugin will re-subscribe them to Sendy without their consent (or awareness).
This is because of the unfortunate way in which Sendy’s
subscribe
API is used for both subscriber creation and updating. This endpoint doesn’t check if an email address already exists but is unsubscribed; it just re-subscribes the email address in this case.There is an outstanding thread in the Sendy support forum for this issue, but while that’s still to be addressed from Sendy’s side, I think a relatively quick fix for this plugin could be implemented, as follows: near the start of the
add_to_sendy_mailer
function inclass-pt-wc-sendy.php
, there should first be a call to Sendy’s/api/subscribers/subscription-status.php
endpoint. The function should then return (abort) if the result of the call isUnsubscribed
; otherwise, it can proceed to perform the call tosubscribe
as normal. There’s just at least one downside to this workaround—it incurs an additional HTTP request, though that shouldn’t matter for most sites.
- The topic ‘Prevent re-activation of unsubscribed users’ is closed to new replies.