Anspress session problem

4.22K viewsIssuessession
1

When I ask a question, the question is added WP_Query always.
I found that Anspress save session value in DB like this.
_transient_anspress_session_7fbd42fedffbc2060fbc73515890cf59 : a:2:{s:13:”form_question”;N;s:9:”questions”;a:1:{i:0;i:1402;}}
How can I turn off this feature?

—— edit

I found that

if ( false === $manual ) {
      anspress()->session->set_question( $post_id );
       ap_ajax_json( array(
        'success' => true,
        'snackbar' => [
          'message' => $message,
        ],
        'redirect' => get_permalink( $post_id ),
        'post_id' => $post_id,
      ) );
    }
     return $post_id;


this code in class-form-hooks.php/submit_question_form()

But, I want to delete the post_id in session(Data Base)!
Would you please make a hook for this?

Check please!

Answered question
0

This cannot be turned off as AnsPress uses this session to validate upload and posts for users. But this get removed once user successfully posts an answer or question. If you want to delete question ids from session then simply run below code anywhere:

anspress()->session->delete( 'questions' );

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