-
Notifications
You must be signed in to change notification settings - Fork 0
/
loader.php
72 lines (60 loc) · 2.28 KB
/
loader.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
64
65
66
67
68
69
70
71
72
<?php
/**
* Library for Connect WooCommerce
*
* @package WordPress
* @author David Perez <[email protected]>
* @copyright 2022 Closemarketing
* @version 1.5.8
*/
defined( 'ABSPATH' ) || exit;
if ( ! defined( 'CONNECT_WOOCOMMERCE_VERSION' ) ) {
define( 'CONNECT_WOOCOMMERCE_VERSION', '1.5.8' );
}
if ( ! defined( 'CONNECT_WOOCOMMERCE_PLUGIN_URL' ) ) {
define( 'CONNECT_WOOCOMMERCE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
}
if ( ! defined( 'CONNECT_WOOCOMMERCE_PLUGIN_PATH' ) ) {
define( 'CONNECT_WOOCOMMERCE_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
}
// Helpers.
require_once CONNECT_WOOCOMMERCE_PLUGIN_PATH . 'lib/helpers/class-sync-helper.php';
require_once CONNECT_WOOCOMMERCE_PLUGIN_PATH . 'lib/helpers/class-sync-products.php';
require_once CONNECT_WOOCOMMERCE_PLUGIN_PATH . 'lib/helpers/class-sync-taxonomies.php';
require_once CONNECT_WOOCOMMERCE_PLUGIN_PATH . 'lib/helpers/class-sync-orders.php';
require_once CONNECT_WOOCOMMERCE_PLUGIN_PATH . 'lib/helpers/class-sync-cron.php';
// Includes files.
require_once CONNECT_WOOCOMMERCE_PLUGIN_PATH . 'lib/class-connect-admin.php';
require_once CONNECT_WOOCOMMERCE_PLUGIN_PATH . 'lib/class-connect-public.php';
require_once CONNECT_WOOCOMMERCE_PLUGIN_PATH . 'lib/class-connect-public-myaccount.php';
// Products sync.
require_once CONNECT_WOOCOMMERCE_PLUGIN_PATH . 'lib/class-connect-import.php';
require_once CONNECT_WOOCOMMERCE_PLUGIN_PATH . 'lib/class-connect-prod-widget.php';
// Orders sync.
require_once CONNECT_WOOCOMMERCE_PLUGIN_PATH . 'lib/class-connect-orders.php';
require_once CONNECT_WOOCOMMERCE_PLUGIN_PATH . 'lib/class-connect-orders-widget.php';
if ( ! class_exists( 'Connect_WooCommerce' ) ) {
/**
* Class Wrapper.
*
* @since Version 3 digits
*/
class Connect_WooCommerce {
/**
* Construct of class
*
* @param array $options Options of plugin.
*/
public function __construct( $options = array() ) {
if ( is_admin() ) {
new Connect_WooCommerce_Admin( $options );
}
new Connect_WooCommerce_Orders( $options );
new Connect_WooCommerce_Import( $options );
new Connect_WooCommerce_Public( $options );
new Connect_WooCommerce_Public_MyAccount( $options );
new Connect_WooCommerce_Product_Widget( $options );
new Connect_WooCommerce_Orders_Widget( $options );
}
}
}