diff --git a/backend/public/downloads/crawlsy-menus-v1.4.0.zip b/backend/public/downloads/crawlsy-menus-v1.4.0.zip new file mode 100644 index 00000000..1c2ca86e Binary files /dev/null and b/backend/public/downloads/crawlsy-menus-v1.4.0.zip differ diff --git a/wordpress-plugin/crawlsy-menus.php b/wordpress-plugin/crawlsy-menus.php index f4ce3585..09d71d85 100644 --- a/wordpress-plugin/crawlsy-menus.php +++ b/wordpress-plugin/crawlsy-menus.php @@ -3,7 +3,7 @@ * Plugin Name: Crawlsy Menus * Plugin URI: https://creationshop.io * Description: Display cannabis product menus from Crawlsy with Elementor integration - * Version: 1.3.0 + * Version: 1.4.0 * Author: Creationshop * Author URI: https://creationshop.io * License: GPL v2 or later @@ -15,8 +15,8 @@ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } -define('CRAWLSY_MENUS_VERSION', '1.3.0'); -define('CRAWLSY_MENUS_API_URL', 'https://dispos.crawlsy.com/api'); +define('CRAWLSY_MENUS_VERSION', '1.4.0'); +define('CRAWLSY_MENUS_API_URL', 'https://dispos.crawlsy.com/api/v1'); define('CRAWLSY_MENUS_PLUGIN_DIR', plugin_dir_path(__FILE__)); define('CRAWLSY_MENUS_PLUGIN_URL', plugin_dir_url(__FILE__)); @@ -156,15 +156,15 @@ class Crawlsy_Menus_Plugin { $('#api-test-result').html('

Testing connection...

'); $.ajax({ - url: apiUrl + '/auth/me', + url: apiUrl + '/menu', method: 'GET', headers: { - 'Authorization': 'Bearer ' + apiToken + 'X-API-Key': apiToken }, success: function(response) { $('#api-test-result').html( - '

Success! Connected as: ' + - response.user.email + '

' + '

Success! Connected to: ' + + response.dispensary + ' (' + response.menu.total_products + ' products)

' ); }, error: function(xhr) { @@ -241,7 +241,7 @@ class Crawlsy_Menus_Plugin { $response = wp_remote_get($url, [ 'headers' => [ - 'Authorization' => 'Bearer ' . $api_token + 'X-API-Key' => $api_token ], 'timeout' => 30 ]); @@ -270,7 +270,7 @@ class Crawlsy_Menus_Plugin { $response = wp_remote_get($url, [ 'headers' => [ - 'Authorization' => 'Bearer ' . $api_token + 'X-API-Key' => $api_token ], 'timeout' => 30 ]);