Ashwin Rajgopal
asked 8 years ago

I am developing MyCRED hooks for DWQA to add the reputation feature to this plugin. I have fully coded the logic, however, I cannot find the right function in DWQA to hook to. I tried hooking to “dwqa-action-vote” first, but that seemed to be just a wrapper for “dwqa_vote_question” and “dwqa_vote_answer”. After looking through the files, I was not able to find those two functions. I know my code is working, as I have successfully hooked to the “vote_best_answer” functions. Any help or code would be appreciated. Thanks.

shady al aref
replied 7 years ago

I am having the same requirement. It would be much appreciated if you let us know how did you hook best answer and voting with MyCred 🙂

nobita
replied 7 years ago

Hi, you can write a function for MyCred and then hook to this : dwqa_vote_best_answer

1 Answers
BigHug
answered 8 years ago

Hi Ashwin,
As you can try in dw-question-answer/inc/actions-vote.php. We can use these action here

do_action( 'dwqa_vote_question', $question_id, $point );
do_action( 'dwqa_vote_answer', $answer_id, $point );

Hope this help.

Powered by DW Question & Answer Pro