PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 8.3.8
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v8.3.8
8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 8.5.8 8.5.7 8.5.6 8.5.5 8.5.4 8.5.3 8.5.2 All 533 releases
← All changes | includes/class-common-function.php +5 -13 8.5.28.3.8 View file →
@@ -94,10 +94,9 @@
94 94 $feedback = sanitize_text_field(wp_unslash($_POST['feedback'])); // "like" or "dislike"
95 95 $meta_info = sanitize_textarea_field(wp_unslash($_POST['meta_info']));
96 96 $date = current_time('mysql');
97 97
98 - $inserted = $wpdb->insert( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
99 - $table, array(
98 + $inserted = $wpdb->insert($table, array(
100 99 'user_id' => $user_id,
101 100 'conversation_id'=> $conversation_id,
102 101 'message' => $message,
103 102 'feedback' => $feedback,
@@ -126,9 +125,9 @@
126 125 $email = sanitize_email(wp_unslash($_POST['email']));
127 126 $message = sanitize_textarea_field(wp_unslash($_POST['message']));
128 127 $report_text = sanitize_textarea_field(wp_unslash($_POST['report_text']));
129 128
130 - $wpdb->insert( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
129 + $wpdb->insert(
131 130 $table_report,
132 131 [
133 132 'user_id' => get_current_user_id(), // or match from wpbot_user.
134 133 'message' => $message,
@@ -227,22 +226,15 @@
227 226 );
228 227 if (get_option('is_stream_enabled') == 1) {
229 228 $response = array(
230 229 'status' => 'error',
231 - 'message' => esc_html(
232 - ( is_array( $qlcd_wp_chatbot_ai_rate_limiting_message ) && ! empty( $qlcd_wp_chatbot_ai_rate_limiting_message[0] ) )
233 - ? $qlcd_wp_chatbot_ai_rate_limiting_message[0]
234 - : __( 'Rate limit exceeded. Please try again later.', 'chatbot' )
235 - ),
230 + 'message' => esc_html__((is_array($qlcd_wp_chatbot_ai_rate_limiting_message) && !empty($qlcd_wp_chatbot_ai_rate_limiting_message[0]) ? $qlcd_wp_chatbot_ai_rate_limiting_message[0] : 'Rate limit exceeded. Please try again later.'), 'chatbot'),
231 +
236 232 );
237 233 } else {
238 234 $response = array(
239 235 'status' => 'success',
240 - 'message' => esc_html(
241 - ( is_array( $qlcd_wp_chatbot_ai_rate_limiting_message ) && ! empty( $qlcd_wp_chatbot_ai_rate_limiting_message[0] ) )
242 - ? $qlcd_wp_chatbot_ai_rate_limiting_message[0]
243 - : __( 'Rate limit exceeded. Please try again later.', 'chatbot' )
244 - ),
236 + 'message' => esc_html__((is_array($qlcd_wp_chatbot_ai_rate_limiting_message) && !empty($qlcd_wp_chatbot_ai_rate_limiting_message[0]) ? $qlcd_wp_chatbot_ai_rate_limiting_message[0] : 'Rate limit exceeded. Please try again later.'), 'chatbot'),
245 237 );
246 238 }
247 239 if (is_user_logged_in()) {
248 240 $user = wp_get_current_user();