Skip to content

Commit 6b6c41e

Browse files
authored
Update hooks.php
1 parent 1385a63 commit 6b6c41e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

chatwoot/hooks.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,14 @@ function hook_chatwoot_footer_output($vars) {
8080
$chatwoot_output = "$chatwoot_jscode
8181
<script>
8282
window.onload = (event) => {
83+
window.\$chatwoot.setUser('$clientid', {
84+
email: '$clientemail',
85+
name: '$clientname',
86+
avatar_url: '$gravatarurl',
87+
})
8388
window.\$chatwoot.setLabel('$chatwoot_label')
8489
}
8590
window.chatwootSettings = {
86-
email: '$clientemail',
8791
position: '$chatwoot_position',
8892
locale: '$chatwoot_lang',
8993
}

0 commit comments

Comments
 (0)