forked from MasterX1582/bitcoin-payments-for-woocommerce
-
Notifications
You must be signed in to change notification settings - Fork 6
/
bwwc-include-all.php
61 lines (48 loc) · 2.31 KB
/
bwwc-include-all.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
<?php
/*
Bitcoin SV Payments for WooCommerce
https://github.com/mboyd1/bitcoin-sv-payments-for-woocommerce
*/
//---------------------------------------------------------------------------
// Global definitions
if (!defined('BWWC_PLUGIN_NAME')) {
define('BWWC_VERSION', '4.20');
//-----------------------------------------------
define('BWWC_EDITION', 'BSV');
//-----------------------------------------------
define('BWWC_SETTINGS_NAME', 'BWWC-Settings');
define('BWWC_PLUGIN_NAME', 'Bitcoin SV Payments for WooCommerce');
// i18n plugin domain for language files
define('BWWC_I18N_DOMAIN', 'bwwc');
if (extension_loaded('gmp') && !defined('USE_EXT')) {
define('USE_EXT', 'GMP');
} elseif (extension_loaded('bcmath') && !defined('USE_EXT')) {
define('USE_EXT', 'BCMATH');
}
}
//---------------------------------------------------------------------------
//------------------------------------------
// Load wordpress for POSTback, WebHook and API pages that are called by external services directly.
if (defined('BWWC_MUST_LOAD_WP') && !defined('WP_USE_THEMES') && !defined('ABSPATH')) {
$g_blog_dir = preg_replace('|(/+[^/]+){4}$|', '', str_replace('\\', '/', __FILE__)); // For love of the art of regex-ing
define('WP_USE_THEMES', false);
require_once($g_blog_dir . '/wp-blog-header.php');
// Force-elimination of header 404 for non-wordpress pages.
header("HTTP/1.1 200 OK");
header("Status: 200 OK");
require_once($g_blog_dir . '/wp-admin/includes/admin.php');
}
//------------------------------------------
// This loads necessary modules and selects best math library
require_once(dirname(__FILE__) . '/libs/util/bcmath_Utils.php');
require_once(dirname(__FILE__) . '/libs/util/gmp_Utils.php');
require_once(dirname(__FILE__) . '/libs/CurveFp.php');
require_once(dirname(__FILE__) . '/libs/Point.php');
require_once(dirname(__FILE__) . '/libs/NumberTheory.php');
require_once(dirname(__FILE__) . '/libs/ElectrumHelper.php');
require_once(dirname(__FILE__) . '/bwwc-cron.php');
require_once(dirname(__FILE__) . '/bwwc-mpkgen.php');
require_once(dirname(__FILE__) . '/bwwc-utils.php');
require_once(dirname(__FILE__) . '/bwwc-admin.php');
require_once(dirname(__FILE__) . '/bwwc-render-settings.php');
require_once(dirname(__FILE__) . '/bwwc-bitcoin-gateway.php');