2
0

🩹 (wp) Fix typebotWpUser not defined issue

This commit is contained in:
Baptiste Arnaud
2023-04-28 16:53:28 +02:00
parent ce2565c429
commit c1f3534374
4 changed files with 11 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@typebot.io/wordpress",
"version": "3.1.7",
"version": "3.1.9",
"main": "index.js",
"repository": "https://github.com/baptisteArno/typebot.io",
"author": "baptisteArno",
@ -11,7 +11,7 @@
},
"scripts": {
"deploy": "pnpm copy && pnpm commit",
"copy": "svn copy ./trunk ./tags/3.1.7",
"commit": "svn ci -m 'Fix wordpress user prefill variables'"
"copy": "svn copy ./trunk ./tags/3.1.9",
"commit": "svn ci -m 'Fix wordpress user prefill variables with shortcode'"
}
}

View File

@ -5,7 +5,7 @@ Requires at least: 5.0
Tested up to: 6.0
License: GPL 2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Stable Tag: 3.1.7
Stable Tag: 3.1.9
== Description ==
Collect 4x more responses with conversational apps using Typebot.
@ -24,6 +24,9 @@ This plugin relies on Typebot which is a tool that allows you to create conversa
3. Activate your Typebot with the "Typebot" admin button located in the sidebar
== Changelog ==
= 3.1.8 =
* Fix forward wp user variable when not initialized
= 3.1.7 =
* Fix forwarded user prefilled variables

View File

@ -101,7 +101,8 @@ class Typebot_Public
$bot_initializer = '<script type="module">
import Typebot from "' . $lib_url . '"
Typebot.initStandard({ apiHost: "' . $api_host . '", id: "' . $id . '", typebot: "' . $typebot . '", prefilledVariables: { ...typebotWpUser } });</script>';
Typebot.initStandard({ apiHost: "' . $api_host . '", id: "' . $id . '", typebot: "' . $typebot . '", prefilledVariables: { ...window.typebotWpUser } });</script>';
return '<typebot-standard id="' . $id . '" style="width: ' . $width . '; height: ' . $height . ';"></typebot-standard>' . $bot_initializer;
}

View File

@ -3,7 +3,7 @@
/**
* Plugin Name: Typebot
* Description: Convert more with conversational forms
* Version: 3.1.7
* Version: 3.1.9
* Author: Typebot
* Author URI: http://typebot.io/
* License: GPL-2.0+
@ -16,7 +16,7 @@ if (!defined('WPINC')) {
die();
}
define('TYPEBOT_VERSION', '3.1.7');
define('TYPEBOT_VERSION', '3.1.9');
function activate_typebot()
{