-
Notifications
You must be signed in to change notification settings - Fork 1
/
installment-plans-for-woo-subs.php
76 lines (62 loc) · 2.38 KB
/
installment-plans-for-woo-subs.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
73
74
75
76
<?php
/**
* Plugin Name: Installment Plans for WooCommerce Subscriptions
* Plugin URI: https://www.nexcess.net
* Description: Extend the Subscriptions plugin for WooCommerce to handle installments.
* Version: 1.0.1
* Author: Nexcess
* Author URI: https://www.nexcess.net
* Text Domain: installment-plans-for-woo-subs
* Domain Path: /languages
* WC requires at least: 5.5.0
* WC tested up to: 5.6.0
* License: MIT
* License URI: https://opensource.org/licenses/MIT
*
* @package InstallmentPlansWooSubs
*/
// Declare our namespace.
namespace Nexcess\InstallmentPlansWooSubs;
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) exit;
// Define our plugin version.
define( __NAMESPACE__ . '\VERS', '1.0.1' );
// Plugin root file.
define( __NAMESPACE__ . '\FILE', __FILE__ );
// Define our file base.
define( __NAMESPACE__ . '\BASE', plugin_basename( __FILE__ ) );
// Plugin Folder URL.
define( __NAMESPACE__ . '\URL', plugin_dir_url( __FILE__ ) );
// Set our includes and template path constants.
define( __NAMESPACE__ . '\INCLUDES_PATH', __DIR__ . '/includes' );
define( __NAMESPACE__ . '\TEMPLATES_PATH', __DIR__ . '/templates' );
// Set the various prefixes for our actions and filters.
define( __NAMESPACE__ . '\HOOK_PREFIX', 'wcs_installment_plans_' );
define( __NAMESPACE__ . '\OPTION_PREFIX', 'wcsip_option_' );
define( __NAMESPACE__ . '\TRANSIENT_PREFIX', 'wcsip_tr_' );
// Set our front menu endpoint constant.
define( __NAMESPACE__ . '\FRONT_VAR', 'installment-plans' );
// Now we handle all the various file loading.
nx_wcs_installment_plans_file_load();
/**
* Actually load our files.
*
* @return void
*/
function nx_wcs_installment_plans_file_load() {
// Load the multi-use files first.
require_once __DIR__ . '/includes/helpers.php';
require_once __DIR__ . '/includes/utilities.php';
// Load the Woo related files.
require_once __DIR__ . '/includes/woo/query-mods.php';
require_once __DIR__ . '/includes/woo/meta.php';
require_once __DIR__ . '/includes/woo/orders.php';
require_once __DIR__ . '/includes/woo/email.php';
require_once __DIR__ . '/includes/woo/account.php';
require_once __DIR__ . '/includes/woo/admin.php';
require_once __DIR__ . '/includes/woo/themes.php';
// Load the triggered file loads.
require_once __DIR__ . '/includes/activate.php';
require_once __DIR__ . '/includes/deactivate.php';
require_once __DIR__ . '/includes/uninstall.php';
}