-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommeriq.php
More file actions
59 lines (51 loc) · 2.09 KB
/
Copy pathcommeriq.php
File metadata and controls
59 lines (51 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* Plugin Name: Wontonee CommerIQ — AI Commerce Insights for WooCommerce
* Plugin URI: https://github.com/wontonee/woocommerce-commeriq
* Description: Supercharge your WooCommerce store with AI-powered product descriptions, automated image generation, intelligent price comparison, and competitive market insights. Boost sales with smart content optimization and data-driven pricing strategies.
* Version: 1.0.8
* Author: Wontonee
* Author URI: https://wontonee.com
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: wontonee-commeriq
* Requires Plugins: woocommerce
*/
defined('ABSPATH') || exit;
if (!defined('COMMERIQ_PLUGIN_FILE')) {
define('COMMERIQ_PLUGIN_FILE', __FILE__);
}
if (!defined('COMMERIQ_PLUGIN_DIR')) {
define('COMMERIQ_PLUGIN_DIR', plugin_dir_path(COMMERIQ_PLUGIN_FILE));
}
if (!defined('COMMERIQ_PLUGIN_URL')) {
define('COMMERIQ_PLUGIN_URL', plugin_dir_url(COMMERIQ_PLUGIN_FILE));
}
if (!defined('COMMERIQ_VERSION')) {
define('COMMERIQ_VERSION', '1.0.8');
}
// API Configuration Constants
if (!defined('COMMERIQ_API_ENV')) {
define('COMMERIQ_API_ENV', 'production'); // 'local' or 'production'
}
if (!defined('COMMERIQ_API_LOCAL')) {
define('COMMERIQ_API_LOCAL', 'https://licenseapp.test/api/commeriq');
}
if (!defined('COMMERIQ_API_PRODUCTION')) {
define('COMMERIQ_API_PRODUCTION', 'https://myapps.wontonee.com/api/commeriq');
}
// Load composer autoload if present
if (file_exists(COMMERIQ_PLUGIN_DIR . 'vendor/autoload.php')) {
require_once COMMERIQ_PLUGIN_DIR . 'vendor/autoload.php';
}
// Load plugin loader
require_once COMMERIQ_PLUGIN_DIR . 'src/commeriq-loader.php';
// Ensure migrations class is available for activation/deactivation
if (file_exists(COMMERIQ_PLUGIN_DIR . 'src/DB/Migrations.php')) {
require_once COMMERIQ_PLUGIN_DIR . 'src/DB/Migrations.php';
}
register_activation_hook(__FILE__, ['CommerIQ\DB\Migrations', 'activate']);
register_deactivation_hook(__FILE__, ['CommerIQ\DB\Migrations', 'deactivate']);
add_action('plugins_loaded', function () {
\CommerIQ\Loader::init();
});