Hello,
The notifications of the extension "User Notifications" do not work for comments or mentions after they have been approved.
This is a big problem because we have set...
Settings > Discussions > Comment Moderation > Keep a comment in the queue if it contains 1 or more links.
In this case, all mentions must be approved and there is never a notification.
It is equally bad that there is no notification for the first comment after it has been approved ("Comment author must have a previously approved comment" is checked within Settings > Discussions as well).
Best regards,
Ben
UPDATE:
I have since found out what the problem is...
In the method addApprovedNotification in the file wp-content/plugins/wpdiscuz-user-notifications/includes/wunHelperActions.php a notification is written to the table wp_wc_users_notifications only if the setting "Notify me when: my comment is approved" is set.
This setting suggests that only the user who made a mention will be notified. In fact, we do not want to notify the user who made a mention, but we do want to notify the user who was mentioned after the mention was approved.
From my point of view, the said code is not optimal and we have optimized it for our use as follows:
if ($newStatus === "approved") { if ($this->dbManager->isNotificationExists($data) || $comment->comment_author_email === $currentUser->user_email) { return; } if (!empty($this->options->data["notifications"]["myCommentApprove"])) { $this->dbManager->addNotification($data); } $this->addGroupedNotification($comment, $comment->comment_approved, null); } else {
With this change, depending on the setting, the user who was mentioned will be notified after an approval and the same applies to the user who mentioned someone.
It would be nice if you could adopt this change so that the plugin remains updateable for us.