Plugin Directory

Changeset 3789171


Ignore:
Timestamp:
11/07/2026 08:15:59 AM (less than one hour ago)
Author:
tufu
Message:

tufu AI 0.5.0: signed-in visitors, WooCommerce orders and guest orders

Location:
tufu-ai
Files:
12 added
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • tufu-ai/tags/0.5.0/blocks/ask/block.json

    r3778574 r3789171  
    33        "apiVersion": 3,
    44        "name": "tufu/ask",
    5         "version": "0.3.0",
     5        "version": "0.5.0",
    66        "title": "tufu Ask",
    77        "category": "widgets",
  • tufu-ai/tags/0.5.0/blocks/ask/index.asset.php

    r3778574 r3789171  
    1212return array(
    1313        'dependencies' => array( 'wp-blocks', 'wp-element', 'wp-block-editor', 'wp-components', 'wp-i18n' ),
    14         'version'      => '0.3.0',
     14        'version'      => '0.5.0',
    1515);
  • tufu-ai/tags/0.5.0/includes/ask.php

    r3753672 r3789171  
    3838        }
    3939        $extra .= sprintf( ' data-tufu-source="%s"', esc_attr( tufu_ai_source() ) );
    40         return sprintf( '<tufu-ask team="%s" bot="%s"%s></tufu-ask>', esc_attr( $team ), esc_attr( $bot ), $extra );
     40        return tufu_ai_signed_element( sprintf( '<tufu-ask team="%s" bot="%s"%s></tufu-ask>', esc_attr( $team ), esc_attr( $bot ), $extra ), $bot );
    4141}
    4242
  • tufu-ai/tags/0.5.0/includes/frontend.php

    r3778574 r3789171  
    9393        }
    9494        $extra .= sprintf( ' data-tufu-source="%s"', esc_attr( tufu_ai_source() ) );
    95         return sprintf( '<tufu-chat team="%s" bot="%s"%s></tufu-chat>', esc_attr( $settings['team'] ), esc_attr( $settings['bot'] ), $extra );
     95        return tufu_ai_signed_element( sprintf( '<tufu-chat team="%s" bot="%s"%s></tufu-chat>', esc_attr( $settings['team'] ), esc_attr( $settings['bot'] ), $extra ), $settings['bot'] );
    9696}
    9797
    … …  
    111111        }
    112112        $extra .= sprintf( ' data-tufu-source="%s"', esc_attr( tufu_ai_source() ) );
    113         return sprintf( '<tufu-ask team="%s" bot="%s" placement="bar"%s></tufu-ask>', esc_attr( $settings['team'] ), esc_attr( $settings['bot'] ), $extra );
     113        return tufu_ai_signed_element( sprintf( '<tufu-ask team="%s" bot="%s" placement="bar"%s></tufu-ask>', esc_attr( $settings['team'] ), esc_attr( $settings['bot'] ), $extra ), $settings['bot'] );
    114114}
    115115
  • tufu-ai/tags/0.5.0/includes/settings.php

    r3778574 r3789171  
    4545                'expired'      => array( 'error', __( 'That connection expired or was already used. Press "Connect to tufu" again.', 'tufu-ai' ) ),
    4646                'disconnected' => array( 'success', __( 'Disconnected. Nothing from tufu loads on your site now.', 'tufu-ai' ) ),
    47         );
     47        ) + tufu_ai_secrets_notices();
    4848        if ( isset( $messages[ $notice ] ) ) {
    4949                printf( '<div class="notice notice-%s"><p>%s</p></div>', esc_attr( $messages[ $notice ][0] ), esc_html( $messages[ $notice ][1] ) );
    … …  
    201201                </form>
    202202
     203                <?php tufu_ai_render_signin_section(); ?>
     204
    203205                <h2><?php esc_html_e( 'Ask console', 'tufu-ai' ); ?></h2>
    204206                <p>
  • tufu-ai/tags/0.5.0/readme.txt

    r3778574 r3789171  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 0.3.0
     7Stable tag: 0.5.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    2727* **Ask console**: the "tufu Ask" block and the `[tufu_ask]` shortcode.
    2828* **Ask bar**: instead of the bubble, a search box fixed at the bottom center of the page that opens the Ask console upward.
    29 * **Connect in a minute**: press "Connect to tufu", sign in or create a free account, pick a bot, and you're back. No API key to copy, nothing secret stored on your site.
     29* **Connect in a minute**: press "Connect to tufu", sign in or create a free account, pick a bot, and you're back. No API key to copy, and nothing secret is stored on your site unless you choose to turn on signed-in visitors.
    3030
    3131The look (colors, button, greeting) and what the bot knows are set in tufu, so they change on your site without touching WordPress.
    … …  
    3535The plugin is free and has no locked features: everything in it works the same on every plan. It shows a service that runs on tufu.ai, and you need a tufu account. tufu has a free plan, and a paid Team plan with more bots, answers and channels: https://tufu.ai/pricing/ . Plan limits are set and counted by tufu, not by this plugin.
    3636
    37 On the free plan, the chat and the Ask console show a small "Powered by tufu" link to https://tufu.ai. On a paid plan you can hide it on the bot's Appearance page in tufu.
     37On the free plan, the chat and the Ask console show a small "Powered by tufu" link to https://tufu.ai. On the Team and Scale plans, or on Starter with the brand removal add-on, you can hide it on the bot's Look tab in tufu.
    3838
    3939== External services ==
    … …  
    4242
    4343* **Connecting your bot.** When you press "Connect to tufu" in Settings > tufu AI, your browser goes to https://tufu.ai/connect/wordpress/ with your site's address, the address of the settings page to come back to, and a random code that the plugin checks when you come back. You sign in to tufu there and pick a bot; tufu sends your browser back with the bot's team and bot IDs, which are public. No password or key passes through your site.
    44 * **The chat bubble and the Ask console.** On pages that show them, your visitors' browsers load tufu's script from https://tufu.ai/widget/v1/tufu-chat.esm.js and fetch the bot's public settings from https://tufu.ai. When a visitor opens the chat or the Ask console, what they type is sent to tufu so the bot can answer. With these requests tufu receives the page address, the usual request data (IP address, browser user agent), and the plugin's name and version (`wordpress/0.3.0`), so tufu can tell WordPress installs apart. tufu keeps the address of the page a conversation started on (the web address without anything after a "?" or "#") with the conversation, so you can see it in your inbox. If a visitor asks for a person and leaves an email address, tufu uses it to send your reply.
     44* **Signed-in visitors (optional, off by default).** With the identity secret pasted and "Sign in logged-in users" on, the page gets a one-hour token from your own site naming the logged-in user (user ID, account email, display name), and the chat sends it to tufu. The token is never in the page's HTML, so a page cache can't share it. Logged-out visitors are never signed.
     45* **WooCommerce orders (optional, off by default).** With WooCommerce active and the signing secret pasted, the plugin answers tufu at /wp-json/tufu-ai/v1/orders, only for requests signed with that secret, and only with the signed-in customer's own orders, or, for a visitor who isn't signed in, the one order whose number and billing email they both give: number, status, date, total, items, shipping method and tracking. Never addresses, phone numbers, payment details, notes or order keys.
     46* **The chat bubble and the Ask console.** On pages that show them, your visitors' browsers load tufu's script from https://tufu.ai/widget/v1/tufu-chat.esm.js and fetch the bot's public settings from https://tufu.ai. When a visitor opens the chat or the Ask console, what they type is sent to tufu so the bot can answer. With these requests tufu receives the page address, the usual request data (IP address, browser user agent), and the plugin's name and version (`wordpress/0.5.0`), so tufu can tell WordPress installs apart. tufu keeps the address of the page a conversation started on (the web address without anything after a "?" or "#") with the conversation, so you can see it in your inbox. If a visitor asks for a person and leaves an email address, tufu uses it to send your reply.
    4547
    46 The plugin itself stores only its settings (team, bot, where the chat shows) and, for 30 minutes while you connect, the random code; it sets no cookies. The chat remembers a visitor's conversation in their browser's storage for tufu.ai.
     48The plugin itself stores only its settings (team, bot, where the chat shows), the two secrets if you paste them (kept on your site, used only to sign and check requests, and shown back only as their last four characters), and, for 30 minutes while you connect, the random code; it sets no cookies. The chat remembers a visitor's conversation in their browser's storage for tufu.ai.
    4749
    4850* Terms of Service: https://tufu.ai/terms/
    … …  
    8486`[tufu_ask placeholder="Search the help" hotkey="k"]`. `placeholder` is the text in the box; `hotkey` is the letter that opens it with Cmd or Ctrl (`hotkey=""` turns the shortcut off); `bot` uses another bot of the same team.
    8587
     88= Can the bot answer "where's my order?" =
     89
     90Yes, for logged-in customers, on tufu's Team and Scale plans. Paste both secrets from your bot's Look it up tab in tufu under Settings > tufu AI > "Signed-in visitors and orders" and turn on "Sign in logged-in users". Then press "WooCommerce orders" on the Look it up tab in tufu, paste the order lookup address shown here, and save. For guest checkouts, also press "WooCommerce orders (guests)": it asks for the order number and the billing email. Guide: https://tufu.ai/docs/wordpress/#woocommerce-orders
     91
    8692= What happens when I delete the plugin? =
    8793
    88 Deleting it removes its settings from your site (every site, on a multisite network). Your bot and its conversations stay in tufu.
     94Deleting it removes its settings and secrets from your site (every site, on a multisite network). Your bot and its conversations stay in tufu.
    8995
    9096== Screenshots ==
    … …  
    97103== Changelog ==
    98104
    99 = 0.3.0 =
    100 * The Ask bar: under Settings > tufu AI > Shows as, pick "An Ask bar" to show a search box at the bottom center of every page instead of the chat bubble. It opens the Ask console upward from the bar; Esc closes it.
    101 * On a page that also has the tufu Ask block or [tufu_ask], the bar leaves Ctrl+K (⌘K) to that box.
     105= 0.5.0 =
     106* Guest orders: the order endpoint also answers tufu's "WooCommerce orders (guests)" lookup, for visitors who aren't logged in. It answers only when the order number and the billing email both match.
    102107
    103 = 0.2.2 =
    104 * "Check it's live on tufu" on the settings page: it opens your bot's "Put it on your site" page in tufu, which says whether the chat has loaded on your site.
    105 * The help for typing the IDs points to that page (it said "Preview page").
    106 * A new FAQ: how tufu differs from AI Engine.
     108= 0.4.0 =
     109* Signed-in visitors: with your bot's identity secret, the chat tells tufu who a logged-in user is. The token is never in the page's HTML, so page caches can't share it.
     110* WooCommerce orders: with the signing secret, the plugin answers tufu's "WooCommerce orders" lookup with a logged-in customer's own orders.
     111* Both are off until you paste the secrets; deleting the plugin removes them.
    107112
    108 = 0.2.1 =
    109 * "Open your inbox on tufu" button on the settings page.
    110 * tufu now shows you the page a conversation started on (the address, without anything after a "?" or "#").
    111 
    112 = 0.2.0 =
    113 * "Connect to tufu": sign in, pick a bot, done. Replaces pasting an API key, so no key ever touches your site.
    114 * "Disconnect", and "Enter IDs instead" for typing the IDs.
    115 * Renamed to "tufu AI" (folder tufu-ai). Activating it carries over the settings of 0.1.0 and switches 0.1.0 off; delete 0.1.0 afterwards.
     113Older versions: changelog.txt in the plugin.
    116114
    117115== Upgrade Notice ==
    118116
    119 = 0.3.0 =
    120 A new way to show tufu: the Ask bar, a search box at the bottom of the page.
     117= 0.5.0 =
     118Your bot can answer "where's my order?" for guest checkouts too, with the order number and billing email.
    121119
    122 = 0.2.2 =
    123 A link from the settings page to check that the chat is live on your site.
    124 
    125 = 0.2.1 =
    126 A shortcut to your inbox on tufu from the settings page.
    127 
    128 = 0.2.0 =
    129 Connect with one button instead of an API key. Replaces the plugin "tufu" 0.1.0: activate this one, then delete the old one.
     120= 0.4.0 =
     121Optional: tell tufu who a logged-in visitor is, and let your bot answer "where's my order?" from WooCommerce.
  • tufu-ai/tags/0.5.0/tufu-ai.php

    r3778574 r3789171  
    44 * Plugin URI:        https://tufu.ai/integrations/wordpress/
    55 * Description:       AI support chat and docs search from tufu on your WordPress site: answers from your own pages, with a person one click away.
    6  * Version:           0.3.0
     6 * Version:           0.5.0
    77 * Requires at least: 6.5
    88 * Requires PHP:      7.4
    … …  
    2020}
    2121
    22 define( 'TUFU_AI_VERSION', '0.3.0' );
     22define( 'TUFU_AI_VERSION', '0.5.0' );
    2323define( 'TUFU_AI_PLUGIN_FILE', __FILE__ );
    2424define( 'TUFU_AI_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    … …  
    3535
    3636require_once TUFU_AI_PLUGIN_DIR . 'includes/options.php';
     37require_once TUFU_AI_PLUGIN_DIR . 'includes/signin.php';
     38require_once TUFU_AI_PLUGIN_DIR . 'includes/orders.php';
    3739require_once TUFU_AI_PLUGIN_DIR . 'includes/frontend.php';
    3840require_once TUFU_AI_PLUGIN_DIR . 'includes/ask.php';
    … …  
    4244        require_once TUFU_AI_PLUGIN_DIR . 'includes/connect.php';
    4345        require_once TUFU_AI_PLUGIN_DIR . 'includes/settings.php';
     46        require_once TUFU_AI_PLUGIN_DIR . 'includes/signin-settings.php';
    4447}
    4548
  • tufu-ai/tags/0.5.0/uninstall.php

    r3753672 r3789171  
    11<?php
    22/**
    3  * Deleting the plugin removes everything it stored, on every site of a multisite network: its settings, every
    4  * admin's pending "Connect to tufu", and what version 0.1.0 (the plugin "tufu") left behind.
     3 * Deleting the plugin removes everything it stored, on every site of a multisite network: its settings, the
     4 * secrets an admin pasted, every admin's pending "Connect to tufu", and what version 0.1.0 (the plugin "tufu") left behind.
    55 *
    66 * @package tufu-ai
    … …  
    1717        global $wpdb;
    1818        delete_option( 'tufu_ai_settings' );
     19        delete_option( 'tufu_ai_secrets' ); // The identity and signing secrets, when an admin pasted them.
    1920        delete_option( 'tufu_settings' ); // 0.1.0's settings.
    2021        // Transients per admin: tufu_ai_connect_<user id> (a pending connect, 30 minutes) and 0.1.0's tufu_bots_<user id>
  • tufu-ai/trunk/blocks/ask/block.json

    r3778574 r3789171  
    33        "apiVersion": 3,
    44        "name": "tufu/ask",
    5         "version": "0.3.0",
     5        "version": "0.5.0",
    66        "title": "tufu Ask",
    77        "category": "widgets",
  • tufu-ai/trunk/blocks/ask/index.asset.php

    r3778574 r3789171  
    1212return array(
    1313        'dependencies' => array( 'wp-blocks', 'wp-element', 'wp-block-editor', 'wp-components', 'wp-i18n' ),
    14         'version'      => '0.3.0',
     14        'version'      => '0.5.0',
    1515);
  • tufu-ai/trunk/includes/ask.php

    r3753672 r3789171  
    3838        }
    3939        $extra .= sprintf( ' data-tufu-source="%s"', esc_attr( tufu_ai_source() ) );
    40         return sprintf( '<tufu-ask team="%s" bot="%s"%s></tufu-ask>', esc_attr( $team ), esc_attr( $bot ), $extra );
     40        return tufu_ai_signed_element( sprintf( '<tufu-ask team="%s" bot="%s"%s></tufu-ask>', esc_attr( $team ), esc_attr( $bot ), $extra ), $bot );
    4141}
    4242
  • tufu-ai/trunk/includes/frontend.php

    r3778574 r3789171  
    9393        }
    9494        $extra .= sprintf( ' data-tufu-source="%s"', esc_attr( tufu_ai_source() ) );
    95         return sprintf( '<tufu-chat team="%s" bot="%s"%s></tufu-chat>', esc_attr( $settings['team'] ), esc_attr( $settings['bot'] ), $extra );
     95        return tufu_ai_signed_element( sprintf( '<tufu-chat team="%s" bot="%s"%s></tufu-chat>', esc_attr( $settings['team'] ), esc_attr( $settings['bot'] ), $extra ), $settings['bot'] );
    9696}
    9797
    … …  
    111111        }
    112112        $extra .= sprintf( ' data-tufu-source="%s"', esc_attr( tufu_ai_source() ) );
    113         return sprintf( '<tufu-ask team="%s" bot="%s" placement="bar"%s></tufu-ask>', esc_attr( $settings['team'] ), esc_attr( $settings['bot'] ), $extra );
     113        return tufu_ai_signed_element( sprintf( '<tufu-ask team="%s" bot="%s" placement="bar"%s></tufu-ask>', esc_attr( $settings['team'] ), esc_attr( $settings['bot'] ), $extra ), $settings['bot'] );
    114114}
    115115
  • tufu-ai/trunk/includes/settings.php

    r3778574 r3789171  
    4545                'expired'      => array( 'error', __( 'That connection expired or was already used. Press "Connect to tufu" again.', 'tufu-ai' ) ),
    4646                'disconnected' => array( 'success', __( 'Disconnected. Nothing from tufu loads on your site now.', 'tufu-ai' ) ),
    47         );
     47        ) + tufu_ai_secrets_notices();
    4848        if ( isset( $messages[ $notice ] ) ) {
    4949                printf( '<div class="notice notice-%s"><p>%s</p></div>', esc_attr( $messages[ $notice ][0] ), esc_html( $messages[ $notice ][1] ) );
    … …  
    201201                </form>
    202202
     203                <?php tufu_ai_render_signin_section(); ?>
     204
    203205                <h2><?php esc_html_e( 'Ask console', 'tufu-ai' ); ?></h2>
    204206                <p>
  • tufu-ai/trunk/readme.txt

    r3778574 r3789171  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 0.3.0
     7Stable tag: 0.5.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    2727* **Ask console**: the "tufu Ask" block and the `[tufu_ask]` shortcode.
    2828* **Ask bar**: instead of the bubble, a search box fixed at the bottom center of the page that opens the Ask console upward.
    29 * **Connect in a minute**: press "Connect to tufu", sign in or create a free account, pick a bot, and you're back. No API key to copy, nothing secret stored on your site.
     29* **Connect in a minute**: press "Connect to tufu", sign in or create a free account, pick a bot, and you're back. No API key to copy, and nothing secret is stored on your site unless you choose to turn on signed-in visitors.
    3030
    3131The look (colors, button, greeting) and what the bot knows are set in tufu, so they change on your site without touching WordPress.
    … …  
    3535The plugin is free and has no locked features: everything in it works the same on every plan. It shows a service that runs on tufu.ai, and you need a tufu account. tufu has a free plan, and a paid Team plan with more bots, answers and channels: https://tufu.ai/pricing/ . Plan limits are set and counted by tufu, not by this plugin.
    3636
    37 On the free plan, the chat and the Ask console show a small "Powered by tufu" link to https://tufu.ai. On a paid plan you can hide it on the bot's Appearance page in tufu.
     37On the free plan, the chat and the Ask console show a small "Powered by tufu" link to https://tufu.ai. On the Team and Scale plans, or on Starter with the brand removal add-on, you can hide it on the bot's Look tab in tufu.
    3838
    3939== External services ==
    … …  
    4242
    4343* **Connecting your bot.** When you press "Connect to tufu" in Settings > tufu AI, your browser goes to https://tufu.ai/connect/wordpress/ with your site's address, the address of the settings page to come back to, and a random code that the plugin checks when you come back. You sign in to tufu there and pick a bot; tufu sends your browser back with the bot's team and bot IDs, which are public. No password or key passes through your site.
    44 * **The chat bubble and the Ask console.** On pages that show them, your visitors' browsers load tufu's script from https://tufu.ai/widget/v1/tufu-chat.esm.js and fetch the bot's public settings from https://tufu.ai. When a visitor opens the chat or the Ask console, what they type is sent to tufu so the bot can answer. With these requests tufu receives the page address, the usual request data (IP address, browser user agent), and the plugin's name and version (`wordpress/0.3.0`), so tufu can tell WordPress installs apart. tufu keeps the address of the page a conversation started on (the web address without anything after a "?" or "#") with the conversation, so you can see it in your inbox. If a visitor asks for a person and leaves an email address, tufu uses it to send your reply.
     44* **Signed-in visitors (optional, off by default).** With the identity secret pasted and "Sign in logged-in users" on, the page gets a one-hour token from your own site naming the logged-in user (user ID, account email, display name), and the chat sends it to tufu. The token is never in the page's HTML, so a page cache can't share it. Logged-out visitors are never signed.
     45* **WooCommerce orders (optional, off by default).** With WooCommerce active and the signing secret pasted, the plugin answers tufu at /wp-json/tufu-ai/v1/orders, only for requests signed with that secret, and only with the signed-in customer's own orders, or, for a visitor who isn't signed in, the one order whose number and billing email they both give: number, status, date, total, items, shipping method and tracking. Never addresses, phone numbers, payment details, notes or order keys.
     46* **The chat bubble and the Ask console.** On pages that show them, your visitors' browsers load tufu's script from https://tufu.ai/widget/v1/tufu-chat.esm.js and fetch the bot's public settings from https://tufu.ai. When a visitor opens the chat or the Ask console, what they type is sent to tufu so the bot can answer. With these requests tufu receives the page address, the usual request data (IP address, browser user agent), and the plugin's name and version (`wordpress/0.5.0`), so tufu can tell WordPress installs apart. tufu keeps the address of the page a conversation started on (the web address without anything after a "?" or "#") with the conversation, so you can see it in your inbox. If a visitor asks for a person and leaves an email address, tufu uses it to send your reply.
    4547
    46 The plugin itself stores only its settings (team, bot, where the chat shows) and, for 30 minutes while you connect, the random code; it sets no cookies. The chat remembers a visitor's conversation in their browser's storage for tufu.ai.
     48The plugin itself stores only its settings (team, bot, where the chat shows), the two secrets if you paste them (kept on your site, used only to sign and check requests, and shown back only as their last four characters), and, for 30 minutes while you connect, the random code; it sets no cookies. The chat remembers a visitor's conversation in their browser's storage for tufu.ai.
    4749
    4850* Terms of Service: https://tufu.ai/terms/
    … …  
    8486`[tufu_ask placeholder="Search the help" hotkey="k"]`. `placeholder` is the text in the box; `hotkey` is the letter that opens it with Cmd or Ctrl (`hotkey=""` turns the shortcut off); `bot` uses another bot of the same team.
    8587
     88= Can the bot answer "where's my order?" =
     89
     90Yes, for logged-in customers, on tufu's Team and Scale plans. Paste both secrets from your bot's Look it up tab in tufu under Settings > tufu AI > "Signed-in visitors and orders" and turn on "Sign in logged-in users". Then press "WooCommerce orders" on the Look it up tab in tufu, paste the order lookup address shown here, and save. For guest checkouts, also press "WooCommerce orders (guests)": it asks for the order number and the billing email. Guide: https://tufu.ai/docs/wordpress/#woocommerce-orders
     91
    8692= What happens when I delete the plugin? =
    8793
    88 Deleting it removes its settings from your site (every site, on a multisite network). Your bot and its conversations stay in tufu.
     94Deleting it removes its settings and secrets from your site (every site, on a multisite network). Your bot and its conversations stay in tufu.
    8995
    9096== Screenshots ==
    … …  
    97103== Changelog ==
    98104
    99 = 0.3.0 =
    100 * The Ask bar: under Settings > tufu AI > Shows as, pick "An Ask bar" to show a search box at the bottom center of every page instead of the chat bubble. It opens the Ask console upward from the bar; Esc closes it.
    101 * On a page that also has the tufu Ask block or [tufu_ask], the bar leaves Ctrl+K (⌘K) to that box.
     105= 0.5.0 =
     106* Guest orders: the order endpoint also answers tufu's "WooCommerce orders (guests)" lookup, for visitors who aren't logged in. It answers only when the order number and the billing email both match.
    102107
    103 = 0.2.2 =
    104 * "Check it's live on tufu" on the settings page: it opens your bot's "Put it on your site" page in tufu, which says whether the chat has loaded on your site.
    105 * The help for typing the IDs points to that page (it said "Preview page").
    106 * A new FAQ: how tufu differs from AI Engine.
     108= 0.4.0 =
     109* Signed-in visitors: with your bot's identity secret, the chat tells tufu who a logged-in user is. The token is never in the page's HTML, so page caches can't share it.
     110* WooCommerce orders: with the signing secret, the plugin answers tufu's "WooCommerce orders" lookup with a logged-in customer's own orders.
     111* Both are off until you paste the secrets; deleting the plugin removes them.
    107112
    108 = 0.2.1 =
    109 * "Open your inbox on tufu" button on the settings page.
    110 * tufu now shows you the page a conversation started on (the address, without anything after a "?" or "#").
    111 
    112 = 0.2.0 =
    113 * "Connect to tufu": sign in, pick a bot, done. Replaces pasting an API key, so no key ever touches your site.
    114 * "Disconnect", and "Enter IDs instead" for typing the IDs.
    115 * Renamed to "tufu AI" (folder tufu-ai). Activating it carries over the settings of 0.1.0 and switches 0.1.0 off; delete 0.1.0 afterwards.
     113Older versions: changelog.txt in the plugin.
    116114
    117115== Upgrade Notice ==
    118116
    119 = 0.3.0 =
    120 A new way to show tufu: the Ask bar, a search box at the bottom of the page.
     117= 0.5.0 =
     118Your bot can answer "where's my order?" for guest checkouts too, with the order number and billing email.
    121119
    122 = 0.2.2 =
    123 A link from the settings page to check that the chat is live on your site.
    124 
    125 = 0.2.1 =
    126 A shortcut to your inbox on tufu from the settings page.
    127 
    128 = 0.2.0 =
    129 Connect with one button instead of an API key. Replaces the plugin "tufu" 0.1.0: activate this one, then delete the old one.
     120= 0.4.0 =
     121Optional: tell tufu who a logged-in visitor is, and let your bot answer "where's my order?" from WooCommerce.
  • tufu-ai/trunk/tufu-ai.php

    r3778574 r3789171  
    44 * Plugin URI:        https://tufu.ai/integrations/wordpress/
    55 * Description:       AI support chat and docs search from tufu on your WordPress site: answers from your own pages, with a person one click away.
    6  * Version:           0.3.0
     6 * Version:           0.5.0
    77 * Requires at least: 6.5
    88 * Requires PHP:      7.4
    … …  
    2020}
    2121
    22 define( 'TUFU_AI_VERSION', '0.3.0' );
     22define( 'TUFU_AI_VERSION', '0.5.0' );
    2323define( 'TUFU_AI_PLUGIN_FILE', __FILE__ );
    2424define( 'TUFU_AI_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    … …  
    3535
    3636require_once TUFU_AI_PLUGIN_DIR . 'includes/options.php';
     37require_once TUFU_AI_PLUGIN_DIR . 'includes/signin.php';
     38require_once TUFU_AI_PLUGIN_DIR . 'includes/orders.php';
    3739require_once TUFU_AI_PLUGIN_DIR . 'includes/frontend.php';
    3840require_once TUFU_AI_PLUGIN_DIR . 'includes/ask.php';
    … …  
    4244        require_once TUFU_AI_PLUGIN_DIR . 'includes/connect.php';
    4345        require_once TUFU_AI_PLUGIN_DIR . 'includes/settings.php';
     46        require_once TUFU_AI_PLUGIN_DIR . 'includes/signin-settings.php';
    4447}
    4548
  • tufu-ai/trunk/uninstall.php

    r3753672 r3789171  
    11<?php
    22/**
    3  * Deleting the plugin removes everything it stored, on every site of a multisite network: its settings, every
    4  * admin's pending "Connect to tufu", and what version 0.1.0 (the plugin "tufu") left behind.
     3 * Deleting the plugin removes everything it stored, on every site of a multisite network: its settings, the
     4 * secrets an admin pasted, every admin's pending "Connect to tufu", and what version 0.1.0 (the plugin "tufu") left behind.
    55 *
    66 * @package tufu-ai
    … …  
    1717        global $wpdb;
    1818        delete_option( 'tufu_ai_settings' );
     19        delete_option( 'tufu_ai_secrets' ); // The identity and signing secrets, when an admin pasted them.
    1920        delete_option( 'tufu_settings' ); // 0.1.0's settings.
    2021        // Transients per admin: tufu_ai_connect_<user id> (a pending connect, 30 minutes) and 0.1.0's tufu_bots_<user id>
Note: See TracChangeset for help on using the changeset viewer.