'Unauthorized' ) ); } $days = isset( $_POST['days'] ) ? absint( $_POST['days'] ) : 7; $data = cwp_ai_questions( max( 1, $days ) ); if ( ! is_array( $data ) ) { wp_send_json_error( array( 'message' => 'Could not load the questions right now.' ) ); } wp_send_json_success( $data ); } ); /** * Prints the list of questions visitors asked. */ function cwp_ai_render_queries_card() { ?>

What visitors asked

Every question, how well your knowledge base matched it and how it was answered. When nothing fits, the assistant gives your email and contact form instead of guessing. Those questions are the best ones to add under Knowledge.

Loading questions...
wp_create_nonce( 'cwp_ai_admin' ), 'days' => (int) cwp_ai_analytics_days(), ) ); ?>