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

@ -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;
}