| @@ -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.22 | |
| 6 | + * Version: 3.2.25 | |
| 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 |
| @@ -480,8 +480,9 @@ | ||
| 480 | 480 | function mxchat_include_classes() { |
| 481 | 481 | $class_files = array( |
| 482 | 482 | 'includes/class-mxchat-model-catalog.php', |
| 483 | 483 | 'includes/class-mxchat-model-liveness.php', |
| 484 | + 'includes/class-mxchat-license-check.php', | |
| 484 | 485 | 'includes/class-mxchat-session-store.php', |
| 485 | 486 | 'includes/class-mxchat-live-agent-schedule.php', |
| 486 | 487 | 'includes/class-mxchat-tool-registry.php', |
| 487 | 488 | 'includes/class-mxchat-integrator.php', |
| @@ -537,8 +538,15 @@ | ||
| 537 | 538 | if (class_exists('MxChat_Model_Liveness')) { |
| 538 | 539 | MxChat_Model_Liveness::init(); |
| 539 | 540 | } |
| 540 | 541 | |
| 542 | + // Licence domain check (c93ede): once a day asks mxchat.ai whether this | |
| 543 | + // site's domain is still switched on for its key, honours an explicit | |
| 544 | + // "off" after a three-day grace period, and fails open on everything else. | |
| 545 | + if (class_exists('MxChat_License_Check')) { | |
| 546 | + MxChat_License_Check::init(); | |
| 547 | + } | |
| 548 | + | |
| 541 | 549 | // Gutenberg chatbot block (plan-95dd1e): a click-to-place wrapper over the |
| 542 | 550 | // [mxchat_chatbot] shortcode. Registers on init; no-op below WP 5.0. |
| 543 | 551 | if (class_exists('MxChat_Block')) { |
| 544 | 552 | MxChat_Block::init(); |
| @@ -1371,8 +1379,9 @@ | ||
| 1371 | 1379 | url TEXT NOT NULL, |
| 1372 | 1380 | article_content LONGTEXT NOT NULL, |
| 1373 | 1381 | embedding_vector LONGTEXT, |
| 1374 | 1382 | source_url TEXT DEFAULT NULL, |
| 1383 | + title VARCHAR(255) DEFAULT NULL, | |
| 1375 | 1384 | role_restriction VARCHAR(50) DEFAULT 'public', |
| 1376 | 1385 | content_type VARCHAR(50) DEFAULT 'content', |
| 1377 | 1386 | timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, |
| 1378 | 1387 | PRIMARY KEY (id), |
| @@ -1443,8 +1452,13 @@ | ||
| 1443 | 1452 | } |
| 1444 | 1453 | if (!in_array('role_restriction', $existing_system_column_names)) { |
| 1445 | 1454 | $wpdb->query("ALTER TABLE $system_prompt_table ADD COLUMN role_restriction VARCHAR(50) DEFAULT 'public' AFTER source_url"); |
| 1446 | 1455 | } |
| 1456 | + // Page title captured at import time (3.2.23, plan d9ee66) - read by | |
| 1457 | + // add-ons that name a source, e.g. AI Search's source cards. | |
| 1458 | + if (!in_array('title', $existing_system_column_names)) { | |
| 1459 | + $wpdb->query("ALTER TABLE $system_prompt_table ADD COLUMN title VARCHAR(255) DEFAULT NULL AFTER source_url"); | |
| 1460 | + } | |
| 1447 | 1461 | } |
| 1448 | 1462 | |
| 1449 | 1463 | // Set default thresholds for existing intents |
| 1450 | 1464 | $wpdb->query("UPDATE {$intents_table} SET similarity_threshold = 0.85 WHERE similarity_threshold IS NULL"); |
| @@ -1543,9 +1557,10 @@ | ||
| 1543 | 1557 | wp_clear_scheduled_hook('mxchat_reset_rate_limits'); |
| 1544 | 1558 | wp_clear_scheduled_hook('mxchat_cleanup_old_transcripts'); |
| 1545 | 1559 | wp_clear_scheduled_hook('mxchat_send_delayed_transcript'); |
| 1546 | 1560 | wp_clear_scheduled_hook('mxchat_model_liveness_check'); |
| 1547 | - | |
| 1561 | + wp_clear_scheduled_hook('mxchat_license_check'); | |
| 1562 | + | |
| 1548 | 1563 | // Clear fallback options |
| 1549 | 1564 | delete_option('mxchat_use_fallback_rate_limits'); |
| 1550 | 1565 | delete_option('mxchat_next_rate_limit_check'); |
| 1551 | 1566 | delete_option('mxchat_fallback_check_interval'); |