-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathidcommerce-globals.php
117 lines (101 loc) · 2.14 KB
/
idcommerce-globals.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?php
// Declare MD Global Variables
/*
1. Crowdfunding Enabled?
*/
$crowdfunding = false;
if (class_exists('IDF') && class_exists('ID_Project')) {
$platform = idf_platform();
if ($platform == 'idc') {
$crowdfunding = true;
}
}
/*
2. Customer ID
*/
/*if (isset($user_id)) {
$member = new ID_Member();
$match = $member->match_user($user_id);
if (isset($match->data)) {
$data = unserialize($match->data);
if (is_array($data)) {
foreach ($data as $item) {
if (is_array($item)) {
foreach ($item as $k=>$v) {
if ($k == 'customer_id') {
$customer_id = $v;
break 2;
}
}
}
}
}
}
}*/
/*
3. Balanced Customer ID
*/
/*if (isset($user_id)) {
$balanced_customer_id = get_user_meta($user_id, 'balanced_customer_id', true);
}*/
/*
4. Credits Available
*/
/*if (isset($user_id)) {
$member = new ID_Member($user_id);
$md_credits = $member->get_user_credits();
}*/
/*
5. Instant Checkout
*/
/*$instant_checkout = false;
$gateways = get_option('memberdeck_gateways');
if (!empty($gateways)) {
$settings = unserialize($gateways);
if (isset($settings['es']) && $settings['es'] == 1) {
if (!empty($customer_id)) {
$instant_checkout = get_user_meta($user_id, 'instant_checkout', true);
}
}
else if (isset($settings['eb']) && $settings['eb'] == 1) {
if (!empty($balanced_customer_id)) {
$instant_checkout = get_user_meta($user_id, 'instant_checkout', true);
}
}
}*/
/*
6. Default Timezone
*/
$tz = get_option('timezone_string');
/*
7. S3
*/
$s3 = 0;
$general = get_option('md_receipt_settings');
if (!empty($general)) {
if (!is_array($general)) {
$settings = unserialize($general);
}
if (is_array($settings)) {
if (isset($settings['s3'])) {
$s3 = $settings['s3'];
}
else {
$s3 = 0;
}
}
}
/**
8. Global Currency display options
*/
$global_currency = get_option('idc_global_currency');
/**
9. Global Permalink Structure
*/
$permalink_structure = get_option('permalink_structure');
/**
10. Stripe API Version
*/
global $stripe_api_version;
$stripe_api_version = "2014-05-19";
?>