<?php
/**
 * Plugin Name: Licenzo
 * Plugin URI: https://getlicenzo.com
 * Description: Licenzo License management system
 * Version: 1.1.1
 * Author: Solvix Studio
 * Author URI: https://solvixstudio.com
 * License: GPL v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: licenzo
 * Domain Path: /languages
 * Requires at least: 5.0
 * Tested up to: 6.9
 * Requires PHP: 8.0
 */

// Prevent direct access
if (!defined('ABSPATH')) {
    exit;
}

// Plugin constants
define('LICENZO_VERSION', '1.1.1');
define('LICENZO_PLUGIN_FILE', __FILE__);
define('LICENZO_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('LICENZO_PLUGIN_URL', plugin_dir_url(__FILE__));
define('LICENZO_PLUGIN_BASENAME', plugin_basename(__FILE__));
require __DIR__.'/vendor/autoload.php';

add_action('before_woocommerce_init', function () {
    if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) {
        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true);
        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('cart_checkout_blocks', __FILE__, true);
    }
});

call_user_func(function($bootstrap) {

    $bootstrap(__FILE__);

}, require(__DIR__.'/boot/app.php'));
