- Minor bugfixes
This commit is contained in:
@@ -40,7 +40,6 @@ class EveAIChatWidget extends HTMLElement {
|
||||
console.log('Chat Widget Connected');
|
||||
this.innerHTML = this.getTemplate();
|
||||
this.setupElements()
|
||||
this.populateLanguageDropdown()
|
||||
this.addEventListeners()
|
||||
|
||||
if (this.areAllAttributesSet()) {
|
||||
@@ -194,7 +193,7 @@ class EveAIChatWidget extends HTMLElement {
|
||||
}
|
||||
|
||||
this.socket = io(this.serverUrl, {
|
||||
path: '/socket.io/',
|
||||
path: '/chat/socket.io/',
|
||||
transports: ['websocket'],
|
||||
query: { // Change from auth to query
|
||||
token: this.sessionToken
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: EveAI Chat Widget
|
||||
* Description: Integrates the EveAI chat interface into your WordPress site.
|
||||
* Version: 2.0.16
|
||||
* Author: Your Company
|
||||
* Description: Integrates the Ask Eve AI (Evie) chat interface into your WordPress site.
|
||||
* Version: 2.0.17
|
||||
* Author: AskEveAI.com
|
||||
* Text Domain: eveai-chat
|
||||
* Domain Path: /languages
|
||||
* Requires at least: 5.8
|
||||
@@ -15,7 +15,7 @@ if (!defined('WPINC')) {
|
||||
}
|
||||
|
||||
// Define plugin constants
|
||||
define('EVEAI_CHAT_VERSION', '2.0.16');
|
||||
define('EVEAI_CHAT_VERSION', '2.0.17');
|
||||
define('EVEAI_CHAT_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
||||
define('EVEAI_CHAT_PLUGIN_URL', plugin_dir_url(__FILE__));
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ class Assets implements Loadable {
|
||||
}
|
||||
|
||||
private function load_assets() {
|
||||
error_log('Starting to load EveAI assets');
|
||||
// Enqueue all required scripts
|
||||
wp_enqueue_script('socket-io');
|
||||
wp_enqueue_script('marked');
|
||||
@@ -93,6 +94,7 @@ class Assets implements Loadable {
|
||||
'nonce' => wp_create_nonce('wp_rest'),
|
||||
'settings' => $this->get_public_settings()
|
||||
]);
|
||||
error_log('EveAI assets loaded');
|
||||
}
|
||||
|
||||
private function get_public_settings() {
|
||||
|
||||
@@ -6,10 +6,10 @@ class RESTController implements Loadable {
|
||||
|
||||
public function init() {
|
||||
add_action('rest_api_init', [$this, 'register_routes']);
|
||||
error_log('REST routes registered for EveAI Chat');
|
||||
}
|
||||
|
||||
public function register_routes() {
|
||||
error_log('Attempting to register EveAI REST routes');
|
||||
register_rest_route(
|
||||
self::API_NAMESPACE,
|
||||
'/token',
|
||||
@@ -39,6 +39,7 @@ class RESTController implements Loadable {
|
||||
'permission_callback' => [$this, 'verify_request'],
|
||||
]
|
||||
);
|
||||
error_log('EveAI REST routes Registered');
|
||||
}
|
||||
|
||||
public function verify_request(\WP_REST_Request $request): bool {
|
||||
|
||||
Reference in New Issue
Block a user