BNFW / Anspress Integration

5.57K viewsCoreBNFW notifications
0

I’m trying to get a Better Notifications For WordPress, which is being used for my blog Posts to also work with Anspress Questions. Its my understanding that the Question is just another post type, and its confirmed by BNFW, as its able to be selected as a post type.
However, its not firing off a notification when submitting a new Question. BNFW uses post transitions to fire off their notifications… some helpful information can be found in this thread: https://wordpress.org/support/topic/duplicate-notifications-6/
I’m currently looking at class-form-hooks.php around lines 425 in order to try to generate a post transition.
Its currently not working, and if I try to use wp_update_post() I get an error message about a duplicate question. And I don’t think I have access to $wpdb->update() in this static method.
Can you provide any direction or help with this integration?

Answered question
0

I think simplest step would be de-register AnsPress hook and then add your hook copying the method with applying your modifications.

Posted new comment

I want to keep all the logic that Anspress goes through in the submit_question_form() method.

If I copy/paste all that into my own hook, its still going to give me the same error?

You are viewing 1 out of 2 answers, click here to view all answers.