This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
wc1c.php
63 lines (54 loc) · 1.46 KB
/
wc1c.php
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
60
61
62
63
<?php
/**
* Plugin Name: WC1C
* Plugin URI: https://wc1c.info
* Description: Implementation of a mechanism for flexible exchange of various data between 1C products and a site running WordPress using the WooCommerce plugin.
* Version: 0.13.1
* WC requires at least: 4.3
* WC tested up to: 7.2
* Requires at least: 5.2
* Requires PHP: 7.0
* Requires Plugins: woocommerce
* Text Domain: wc1c
* Domain Path: /assets/languages
* Copyright: WC1C team © 2018-2022
* Author: WC1C team
* Author URI: https://wc1c.info
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*
* @package Wc1c
**/
defined('ABSPATH') || exit;
if(version_compare(PHP_VERSION, '7.0') < 0)
{
return false;
}
if(false === defined('WC1C_PLUGIN_FILE'))
{
define('WC1C_PLUGIN_FILE', __FILE__);
/**
* Main instance of WC1C
*
* @return Wc1c\Core
*/
function wc1c(): Wc1c\Core
{
return Wc1c\Core::instance();
}
include_once __DIR__ . '/vendor/autoload.php';
$loader = new Digiom\Woplucore\Loader();
$loader->addNamespace('Wc1c', plugin_dir_path(WC1C_PLUGIN_FILE) . 'src');
try
{
$loader->register(WC1C_PLUGIN_FILE);
}
catch(\Exception $e)
{
trigger_error($e->getMessage());
}
$loader->registerActivation([Wc1c\Activation::class, 'instance']);
$loader->registerDeactivation([Wc1c\Deactivation::class, 'instance']);
$loader->registerUninstall([Wc1c\Uninstall::class, 'instance']);
wc1c()->register(new Wc1c\Context(), $loader);
}