Prevent duplicate sending when a post is in more than one category
Marcos Romero
My problem:
The site is organized in sections. Sections are managed with WordPress categories.
I have three different lists, mnatching the sections of the website.
Whenever I publish a new post in a section, a post notification email is sent to subscribers of the matching list, with a single post of that category.
My problem is that users can subscribe to more than one list. And posts may be posted in more than one category.
So subscribers may receive more than one post notification referring to the same post.
Possible solution 1:
Define in a variable the category of the "recent posts". This way I would have one single post notification email for all my categories.
Possible solution 2:
Have a check to verify before sending if the same contents of the post notification email are sent to the same person an avoid those particular cases (duplicates).
Jiří Veselý
Same issue reported here: https://wordpress.org/support/topic/same-e-mail-sent-twice/
Bruna a11n (@bruberries) mentions there that the pair newsletter ID and subscriber ID is being checked but you can't check subscriber ID / post ID.
I don't understand why.
As described in linked issue this situation is nothing uncommon so I believe that solving this issue would help many users to avoid a SPAM generation.