The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
wpdiscuz_comment_au...
 
Share:
Notifications
Clear all

Bug [Solved] wpdiscuz_comment_author filter not working in v7.6.30

5 Posts
3 Users
0 Reactions
122 Views
Posts: 2
Topic starter
(@tomjenx)
New Member
Joined: 4 weeks ago

Hi

Starting with version 7.6.30 the filter wpdiscuz_comment_author no longer works. We were using this to change the author display name, to be anonymous, based on some custom user fields. This now no longer works.

The version 7.6.29 and all prior versions works fine.

Using your demo code found here  https://wpdiscuz.com/docs/codex/filters/wpdiscuz_comment_author/ :

add_filter(“wpdiscuz_comment_author”, function ($authorName, $comment) {
$authorName = “Boss”;
return $authorName;
}, 10, 2);

This now longer works either, and “Boss” is not used on any comments that are returned via the AJAX request.

If someone could please look into this, as for now, we are locked at 7.6.29.

4 Replies
Asti
Posts: 8000
 Asti
Support
(@asti)
Illustrious Member
Joined: 8 years ago

Hi,

We've tested this multiple times on our end and haven't been able to reproduce the issue. Could you please record a video demonstrating the problem, so we can better understand and assist you?

Posts: 6
(@aptharsia)
Active Member
Joined: 3 years ago

Just wanted to say, it's not just you. Doing it for me too. I use it to display the comment count for each comment author.

2 Replies
(@tomjenx)
Joined: 4 weeks ago

New Member
Posts: 2

@aptharsia I managed to fix this by changing the priority of the hook. For me this worked:

add_filter(“wpdiscuz_comment_author”, function ($authorName, $comment) {
$authorName = “Boss”;
return $authorName;
}, 10000, 2);

Obviously change it what will work for you (and your code).

This fix is very change as there is no other usage of the wpdiscuz_comment_author hook within the theme and / or other plugins and does the same on a blank theme.

(@aptharsia)
Joined: 3 years ago

Active Member
Posts: 6

@tomjenx That fixed it for me! Thank you!

Share: