Plugin Directory

Changeset 3475370


Ignore:
Timestamp:
03/05/2026 09:29:04 AM (4 weeks ago)
Author:
m1styk
Message:

Fix API key reset on second save; update API base URL to insertabot.io

Location:
insertabot-ai-chatbot-solution/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • insertabot-ai-chatbot-solution/trunk/includes/admin-settings.php

    r3473149 r3475370  
    112112        $value = is_string($value) ? sanitize_text_field($value) : '';
    113113
    114         // Clear API key
     114        // Empty submission — the field is always blank by design (key is never pre-filled).
     115        // Only clear the stored key if there isn't one already; otherwise treat as no-change.
    115116        if ($value === '') {
    116             // Store cleared value via secure storage
    117             if (class_exists('Insertabot_Security')) {
    118                 Insertabot_Security::store_api_key('');
     117            if (class_exists('Insertabot_Security') && Insertabot_Security::get_api_key() !== '') {
     118                // Key already stored — blank field means "leave it alone".
     119                return '';
    119120            }
    120             // Also clear the cached customer_id.
    121             delete_option(self::OPTION_CUST_ID);
    122             // Force disable when API key is cleared.
    123             update_option(self::OPTION_EN, false);
     121            // No key stored yet — nothing to clear.
    124122            return '';
    125123        }
  • insertabot-ai-chatbot-solution/trunk/insertabot-ai-chatbot-solution.php

    r3475215 r3475370  
    44 * Plugin URI: https://insertabot.io
    55 * Description: Add a customizable AI chatbot to your WordPress site. Real-time web search, unlimited conversations. Get your free API key at insertabot.io
    6  * Version: 1.0.6
     6 * Version: 1.0.5
    77 * Author: Mistyk Media
    88 * Author URI: https://mistykmedia.com
     
    2121
    2222// Define plugin constants
    23 define('INSERTABOT_VERSION', '1.0.6');
     23define('INSERTABOT_VERSION', '1.0.5');
    2424define('INSERTABOT_PLUGIN_DIR', plugin_dir_path(__FILE__));
    2525define('INSERTABOT_PLUGIN_URL', plugin_dir_url(__FILE__));
  • insertabot-ai-chatbot-solution/trunk/readme.txt

    r3475215 r3475370  
    44Requires at least: 5.9
    55Tested up to: 6.9
    6 Stable tag: 1.0.6
     6Stable tag: 1.0.3
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    8383This plugin connects to the Insertabot API service to provide AI chatbot functionality.
    8484
    85 **Service URL:** https://api.insertabot.io
     85**Service URL:** https://insertabot.io
    8686
    8787**When the chatbot is enabled, the following data is transmitted:**
     
    206206== Changelog ==
    207207
    208 = 1.0.6 =
    209 * Fix: Corrected API base URL from api.insertabot.io (unresolvable) to insertabot.io to match Cloudflare Worker routes
    210 
    211 = 1.0.5 =
    212 * Fix: Added X-API-Key to fetch headers to avoid hitting auth guard and returning 401 before reaching checkout logic
    213 
    214 = 1.0.4 =
    215 * Added: Diagnostics.php - Add ?insertabot_debug1 to the end of your URL for api specs
    216 * Added: TROUBLESHOOTING.md - A follow-along troubleshooting guide for chatbot functionality
    217 
    218208= 1.0.3 =
    219209* Fix: Widget no longer requires manual script tag in footer — plugin now injects it automatically on all pages
Note: See TracChangeset for help on using the changeset viewer.