<?php
/**
 * The plugin bootstrap file
 *
 * This file is read by WordPress or ClassicPress to generate the plugin information in the plugin
 * admin area. This file also includes all of the dependencies used by the plugin,
 * registers the activation and deactivation functions, and defines a function
 * that starts the plugin.
 *
 * @link              https://www.byrst.com
 * @since             1.0.0
 * @package           Byrst_Woocommerce_Plugin
 *
 * @wordpress-plugin
 * Plugin Name:       Byrst 3D for WooCommerce
 * Description:       Byrst 3D for WooCommerce: Create and Display 3D Models of Your Products in 3D & AR
 * Version:           1.0.1
 * Author:            wpbyrst
 * Requires at least: 5.9
 * Requires PHP:      7.4
 * Tested up to:      6.5
 * Requires Plugins: woocommerce
 * WC requires at least: 3.9
 * WC tested up to: 8.8
 * Author URI:        https://www.byrst.com
 * License:           GPLv2 or later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:       byrst-3d-for-woocommerce
 * Domain Path:       /languages
 */

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}

/**
 * Get the bootstrap!
 * (Update path to use cmb2 or CMB2, depending on the name of the folder.
 * Case-sensitive is important on some systems.)
 */
require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';

/**
 * Current plugin version.
 * Start at version 1.0.0 and use SemVer - https://semver.org
 * Rename this for your plugin and update it as you release new versions.
 */
define( 'BYRST_WOOCOMMERCE_PLUGIN_VERSION', '1.0.1' );

/**
 * Define the Plugin basename
 */
define( 'BYRST_WOOCOMMERCE_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );

/**
 * The code that runs during plugin activation.
 *
 * This action is documented in includes/class-byrst-woocommerce-plugin-activator.php
 * Full security checks are performed inside the class.
 */
function byrst_woocommerce_plugin_activate() {
	require_once plugin_dir_path( __FILE__ ) . 'includes/class-byrst-woocommerce-plugin-activator.php';
	Byrst_Woocommerce_Plugin_Activator::activate();
}

/**
 * The code that runs during plugin deactivation.
 *
 * This action is documented in includes/class-byrst-woocommerce-plugin-deactivator.php
 * Full security checks are performed inside the class.
 */
function byrst_woocommerce_plugin_deactivate() {
	require_once plugin_dir_path( __FILE__ ) . 'includes/class-byrst-woocommerce-plugin-deactivator.php';
	Byrst_Woocommerce_Plugin_Deactivator::deactivate();
}

register_activation_hook( __FILE__, 'byrst_woocommerce_plugin_activate' );
register_deactivation_hook( __FILE__, 'byrst_woocommerce_plugin_deactivate' );

/**
 * The core plugin class that is used to define internationalization,
 * admin-specific hooks, and public-facing site hooks.
 */
require plugin_dir_path( __FILE__ ) . 'includes/class-byrst-woocommerce-plugin.php';

/**
 * Begins execution of the plugin.
 *
 * Since everything within the plugin is registered via hooks,
 * kicking off the plugin from this point in the file does
 * not affect the page life cycle.
 *
 * Generally you will want to hook this function, instead of callign it globally.
 * However since the purpose of your plugin is not known until you write it, we include the function globally.
 *
 * @since    1.0.0
 */
function byrst_woocommerce_plugin_run() {

	$plugin = new Byrst_Woocommerce_Plugin();
	$plugin->run();

}
byrst_woocommerce_plugin_run();
