| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: MxChat |
| 4 | 4 | * Plugin URI: https://mxchat.ai/ |
| 5 | 5 | * Description: AI chatbot for WordPress with OpenAI, Claude, xAI, DeepSeek, live agent, PDF uploads, WooCommerce, and training on website data. |
| 6 | - * Version: 3.2.4 | |
| 6 | + * Version: 3.1.8 | |
| 7 | 7 | * Author: MxChat |
| 8 | 8 | * Author URI: https://mxchat.ai |
| 9 | 9 | * License: GPLv2 or later |
| 10 | 10 | * License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| @@ -608,33 +608,8 @@ | ||
| 608 | 608 | update_option('mxchat_content_type_migration_version', '2.5.6'); |
| 609 | 609 | } |
| 610 | 610 | |
| 611 | 611 | /** |
| 612 | - * 3.2.4: Backfill the active embedding model option for installs that already | |
| 613 | - * have KB content but no stamped model. The mismatch warning compares this | |
| 614 | - * against the user's currently selected model — no per-row column needed. | |
| 615 | - */ | |
| 616 | -function mxchat_backfill_active_embedding_model() { | |
| 617 | - global $wpdb; | |
| 618 | - | |
| 619 | - if (get_option('mxchat_active_embedding_model', '') !== '') { | |
| 620 | - return; | |
| 621 | - } | |
| 622 | - | |
| 623 | - $kb_table = $wpdb->prefix . 'mxchat_system_prompt_content'; | |
| 624 | - if ($wpdb->get_var("SHOW TABLES LIKE '{$kb_table}'") !== $kb_table) { | |
| 625 | - return; | |
| 626 | - } | |
| 627 | - | |
| 628 | - $kb_count = (int) $wpdb->get_var("SELECT COUNT(*) FROM {$kb_table}"); | |
| 629 | - if ($kb_count > 0) { | |
| 630 | - $options = get_option('mxchat_options', array()); | |
| 631 | - $current_model = $options['embedding_model'] ?? 'text-embedding-ada-002'; | |
| 632 | - update_option('mxchat_active_embedding_model', $current_model, false); | |
| 633 | - } | |
| 634 | -} | |
| 635 | - | |
| 636 | -/** | |
| 637 | 612 | * 2.5.2: Create queue processing tables for reliable background processing |
| 638 | 613 | */ |
| 639 | 614 | function mxchat_create_queue_tables() { |
| 640 | 615 | global $wpdb; |
| @@ -937,11 +912,8 @@ | ||
| 937 | 912 | |
| 938 | 913 | // Run migration for existing installations |
| 939 | 914 | mxchat_migrate_pinecone_roles_add_bot_id(); |
| 940 | 915 | |
| 941 | - // 3.2.4: Backfill active embedding model option (replaces 3.2.3 column-based tracking) | |
| 942 | - mxchat_backfill_active_embedding_model(); | |
| 943 | - | |
| 944 | 916 | // Setup cron jobs |
| 945 | 917 | mxchat_setup_cron_jobs(); |
| 946 | 918 | |
| 947 | 919 | // Update version |
| @@ -1114,14 +1086,8 @@ | ||
| 1114 | 1086 | // 3.1.7: Clean up stale shared session email/name entries |
| 1115 | 1087 | if (version_compare($current_version, '3.1.7', '<')) { |
| 1116 | 1088 | delete_option('mxchat_email_null'); |
| 1117 | 1089 | delete_option('mxchat_name_null'); |
| 1118 | - } | |
| 1119 | - | |
| 1120 | - // 3.2.4: Backfill active embedding model option for the warning UI | |
| 1121 | - // (replaces the per-row column tracking from 3.2.3, which was reverted) | |
| 1122 | - if (version_compare($current_version, '3.2.4', '<')) { | |
| 1123 | - mxchat_backfill_active_embedding_model(); | |
| 1124 | 1090 | } |
| 1125 | 1091 | |
| 1126 | 1092 | // Run full activation to ensure everything is up to date |
| 1127 | 1093 | mxchat_activate(); |