<?php
/**
 * Plugin Name: Asuka Product Designer
 * Plugin URI: https://portal.asukadev.com/wordpress-woocommerce
 * Description: Product customization for WordPress and WooCommerce, powered by AsukaDesigner.
 * Version: 1.2.46
 * Requires at least: 6.6
 * Requires PHP: 8.1
 * WC requires at least: 8.3
 * WC tested up to: 10.6
 * Author: AsukaDev
 * Author URI: https://portal.asukadev.com
 * License: GPLv2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: asuka-product-designer
 * Domain Path: /languages
 */

defined('ABSPATH') || exit;

define('ASUKA_PRODUCT_DESIGNER_VERSION', '1.2.46');
define('ASUKA_PRODUCT_DESIGNER_JS_VERSION', '1.2.35');
define('ASUKA_PRODUCT_DESIGNER_FILE', __FILE__);
define('ASUKA_PRODUCT_DESIGNER_PATH', plugin_dir_path(__FILE__));
define('ASUKA_PRODUCT_DESIGNER_URL', plugin_dir_url(__FILE__));
define('ASUKA_PRODUCT_DESIGNER_ASSETS_URL', ASUKA_PRODUCT_DESIGNER_URL . 'assets/');

require_once ASUKA_PRODUCT_DESIGNER_PATH . 'includes/autoload.php';

\APD\WooCommerce\Compatibility::register();

register_activation_hook(ASUKA_PRODUCT_DESIGNER_FILE, [\APD\Installation\Activator::class, 'activate']);
register_deactivation_hook(ASUKA_PRODUCT_DESIGNER_FILE, [\APD\Installation\Deactivator::class, 'deactivate']);

// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- The full plugin name makes this bootstrap accessor globally unique.
function asuka_product_designer_plugin() : \APD\Plugin {
    static $plugin = null;
    if ($plugin === null) {
        $plugin = new \APD\Plugin();
        $plugin->boot();
    }

    return $plugin;
}

asuka_product_designer_plugin();
