Co-Authors-Plus
Co-Authors-Plus copied to clipboard
wp_notify_postauthor() doesn't notify authors in some situations
The function does a foreach
loop over all of the authors of the post. But inside the foreach
loop, return false
is used instead of continue
which means that subsequent authors are not notified.
https://github.com/Automattic/Co-Authors-Plus/blob/525f211c38b56e6b52bbb1e8b88e8f408dc411be/co-authors-plus.php#L1555-L1574
Changing these three return false;
s to continue;
would fix it.
See also: #403
I totally agree with the statement of @tomdxw because the condition in this code is related to the particular user, thus we should have to skip that particular user to be notified only and not the rest of all user.
Current behavior: it not notifying subsequent user because of particular author's condition match.
Please check my above PR and do let me know if there are any changes needed.