<?php

/**
 * @link https://www.site.pro
 * @since 2.0.0
 * @package B1_Accounting
 *
 * @wordpress-plugin
 * Plugin Name: Site.pro for WooCommerce
 * Plugin URI: https://www.site.pro
 * Description: Integration with Site.pro
 * Version: 2.2.72
 * Author: Site.pro
 * Author URI: https://www.site.pro
 * License: GPL2
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: b1-accounting
 * Domain Path: /languages
 * Requires at least: 4.9.4
 * Tested up to: 6.8.2
 */
if (!defined('WPINC')) {
    die;
}

define('B1_ACCOUNTING_VERSION', '2.2.72');
require_once plugin_dir_path(__FILE__) . 'includes/class-b1-accounting.php';

function activate_b1_accounting()
{
    if (!defined('PHP_VERSION_ID') || (PHP_VERSION_ID < 70000)) {
        deactivate_plugins(__FILE__);
        wp_die(esc_html('The Site.pro For WooCommerce plugin requires min PHP version 7.0!', 'b1-accounting'));
    }
    require_once plugin_dir_path(__FILE__) . 'includes/class-b1-accounting-activator.php';
    B1_Accounting_Activator::activate();
}

function deactivate_b1_accounting()
{
    require_once plugin_dir_path(__FILE__) . 'includes/class-b1-accounting-deactivator.php';
    B1_Accounting_Deactivator::deactivate();
}

register_activation_hook(__FILE__, 'activate_b1_accounting');
register_deactivation_hook(__FILE__, 'deactivate_b1_accounting');
register_uninstall_hook(__FILE__, 'deactivate_b1_accounting');


/**
 * @since 2.0.0
 */
function run_b1_accounting()
{
    $plugin = new B1_Accounting();
    $plugin->run();
}

run_b1_accounting();
