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

[Solved] Custom callback after adding a comment

3 Posts
2 Users
1 Reactions
1,364 Views
Posts: 2
Topic starter
(@curiousjake)
New Member
Joined: 4 years ago

Hi,

I'm trying to use the 'wpdiscuz_comment_post' filter to register a custom callback after a comment is posted, but I'm getting an error saying 'myCallback is not a function'. Digging into the source code, it seems like the runCallbacks function actually looks for the callback in the wpdiscuzAjaxObj array.

Any ideas how I can register a callback in JS that can be run after a comment is posted?

Thanks in advance!

2 Replies
Asti
Posts: 7661
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

Please rewrite your custom code with the following function: 

wpdiscuzAjaxObj.myCallback = function () {
}
1 Reply
(@curiousjake)
Joined: 4 years ago

New Member
Posts: 2

@asti Perfect, this has fixed the problem. Thanks!

Share: