Limited Support
Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed. We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.
I have a post with 5K+ comment followers and every comment generate a big mail server queue and slow down my server, 2 comments or 3 comments in sequence... doom. So, how can i purge the notifications from this specific post? Thanks.
Hi @eduardorms,
I'm sorry, but there is no option for this. You should do it using wpdiscuz_email_notification hook. I mean that disable the subscription for the current post using the hook.
Thanks. Is there any example code of wpdiscuz_email_notification use?
Hi @eduardorms,
Please add the following code in your active theme's functions.php file. Please change the red marked code before using, set it the current post ID.
// disable notifications from the specific (X) post
add_filter('wpdiscuz_email_notification', function ($val, $emailData, $comment) {
if ($comment->comment_post_ID == X) {
$val = false;
}
return $val;
}, 1, 3);
// followers
add_filter('wpdiscuz_follow_email_notification', function ($val, $followerData, $comment) {
if ($comment->comment_post_ID == X) {
$val = false;
}
return $val;
}, 1, 3);