| @@ -61,9 +61,9 @@ | ||
| 61 | 61 | $per_page, |
| 62 | 62 | $offset |
| 63 | 63 | ); |
| 64 | 64 | |
| 65 | - $result = $wpdb->get_results( $sql, 'ARRAY_A' ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, PluginCheck.Security.DirectDB.UnescapedDBParameter | |
| 65 | + $result = $wpdb->get_results( $sql, 'ARRAY_A' ); //DB Call OK, No Caching OK | |
| 66 | 66 | |
| 67 | 67 | return $result; |
| 68 | 68 | } |
| 69 | 69 | |
| @@ -75,13 +75,13 @@ | ||
| 75 | 75 | */ |
| 76 | 76 | public static function delete_response( $id ) { |
| 77 | 77 | global $wpdb; |
| 78 | 78 | |
| 79 | - $wpdb->delete( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching | |
| 79 | + $wpdb->delete( | |
| 80 | 80 | "{$wpdb->prefix}wpbot_response", |
| 81 | 81 | [ 'id' => $id ], |
| 82 | 82 | [ '%d' ] |
| 83 | - ); | |
| 83 | + ); //DB Call OK, No Caching OK | |
| 84 | 84 | |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | |
| @@ -94,9 +94,9 @@ | ||
| 94 | 94 | global $wpdb; |
| 95 | 95 | |
| 96 | 96 | $sql = "SELECT COUNT(*) FROM {$wpdb->prefix}wpbot_response"; |
| 97 | 97 | |
| 98 | - return $wpdb->get_var( $sql ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared | |
| 98 | + return $wpdb->get_var( $sql ); //DB Call OK, No Caching OK | |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | |
| 102 | 102 | /** Text displayed when no customer data is available */ |
| @@ -309,10 +309,10 @@ | ||
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | // esc_url_raw() is used to prevent converting ampersand in url to "#038;" |
| 312 | 312 | // add_query_arg() return the current url |
| 313 | - wp_safe_redirect( esc_url_raw($this->chatbot_admin_page) ); | |
| 313 | + wp_redirect( esc_url_raw($this->chatbot_admin_page) ); | |
| 314 | 314 | exit; |
| 315 | 315 | } |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | } |