|
@@ -1,158 +1,158 @@ |
|
|
block discarded – undo |
|
1
|
1
|
<?php |
|
2
|
|
-if ( ! defined( 'ABSPATH' ) ) { |
|
|
2
|
+if ( ! defined('ABSPATH')) { |
|
3
|
3
|
exit; |
|
4
|
4
|
} |
|
5
|
5
|
|
|
6
|
|
-return apply_filters( 'wc_stripe_settings', |
|
|
6
|
+return apply_filters('wc_stripe_settings', |
|
7
|
7
|
array( |
|
8
|
8
|
'enabled' => array( |
|
9
|
|
- 'title' => __( 'Enable/Disable', 'woocommerce-gateway-stripe' ), |
|
10
|
|
- 'label' => __( 'Enable Stripe', 'woocommerce-gateway-stripe' ), |
|
|
9
|
+ 'title' => __('Enable/Disable', 'woocommerce-gateway-stripe'), |
|
|
10
|
+ 'label' => __('Enable Stripe', 'woocommerce-gateway-stripe'), |
|
11
|
11
|
'type' => 'checkbox', |
|
12
|
12
|
'description' => '', |
|
13
|
13
|
'default' => 'no' |
|
14
|
14
|
), |
|
15
|
15
|
'title' => array( |
|
16
|
|
- 'title' => __( 'Title', 'woocommerce-gateway-stripe' ), |
|
|
16
|
+ 'title' => __('Title', 'woocommerce-gateway-stripe'), |
|
17
|
17
|
'type' => 'text', |
|
18
|
|
- 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce-gateway-stripe' ), |
|
19
|
|
- 'default' => __( 'Credit Card (Stripe)', 'woocommerce-gateway-stripe' ), |
|
|
18
|
+ 'description' => __('This controls the title which the user sees during checkout.', 'woocommerce-gateway-stripe'), |
|
|
19
|
+ 'default' => __('Credit Card (Stripe)', 'woocommerce-gateway-stripe'), |
|
20
|
20
|
'desc_tip' => true, |
|
21
|
21
|
), |
|
22
|
22
|
'description' => array( |
|
23
|
|
- 'title' => __( 'Description', 'woocommerce-gateway-stripe' ), |
|
|
23
|
+ 'title' => __('Description', 'woocommerce-gateway-stripe'), |
|
24
|
24
|
'type' => 'text', |
|
25
|
|
- 'description' => __( 'This controls the description which the user sees during checkout.', 'woocommerce-gateway-stripe' ), |
|
26
|
|
- 'default' => __( 'Pay with your credit card via Stripe.', 'woocommerce-gateway-stripe'), |
|
|
25
|
+ 'description' => __('This controls the description which the user sees during checkout.', 'woocommerce-gateway-stripe'), |
|
|
26
|
+ 'default' => __('Pay with your credit card via Stripe.', 'woocommerce-gateway-stripe'), |
|
27
|
27
|
'desc_tip' => true, |
|
28
|
28
|
), |
|
29
|
29
|
'testmode' => array( |
|
30
|
|
- 'title' => __( 'Test mode', 'woocommerce-gateway-stripe' ), |
|
31
|
|
- 'label' => __( 'Enable Test Mode', 'woocommerce-gateway-stripe' ), |
|
|
30
|
+ 'title' => __('Test mode', 'woocommerce-gateway-stripe'), |
|
|
31
|
+ 'label' => __('Enable Test Mode', 'woocommerce-gateway-stripe'), |
|
32
|
32
|
'type' => 'checkbox', |
|
33
|
|
- 'description' => __( 'Place the payment gateway in test mode using test API keys.', 'woocommerce-gateway-stripe' ), |
|
|
33
|
+ 'description' => __('Place the payment gateway in test mode using test API keys.', 'woocommerce-gateway-stripe'), |
|
34
|
34
|
'default' => 'yes', |
|
35
|
35
|
'desc_tip' => true, |
|
36
|
36
|
), |
|
37
|
37
|
'test_secret_key' => array( |
|
38
|
|
- 'title' => __( 'Test Secret Key', 'woocommerce-gateway-stripe' ), |
|
|
38
|
+ 'title' => __('Test Secret Key', 'woocommerce-gateway-stripe'), |
|
39
|
39
|
'type' => 'text', |
|
40
|
|
- 'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ), |
|
|
40
|
+ 'description' => __('Get your API keys from your stripe account.', 'woocommerce-gateway-stripe'), |
|
41
|
41
|
'default' => '', |
|
42
|
42
|
'desc_tip' => true, |
|
43
|
43
|
), |
|
44
|
44
|
'test_publishable_key' => array( |
|
45
|
|
- 'title' => __( 'Test Publishable Key', 'woocommerce-gateway-stripe' ), |
|
|
45
|
+ 'title' => __('Test Publishable Key', 'woocommerce-gateway-stripe'), |
|
46
|
46
|
'type' => 'text', |
|
47
|
|
- 'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ), |
|
|
47
|
+ 'description' => __('Get your API keys from your stripe account.', 'woocommerce-gateway-stripe'), |
|
48
|
48
|
'default' => '', |
|
49
|
49
|
'desc_tip' => true, |
|
50
|
50
|
), |
|
51
|
51
|
'secret_key' => array( |
|
52
|
|
- 'title' => __( 'Live Secret Key', 'woocommerce-gateway-stripe' ), |
|
|
52
|
+ 'title' => __('Live Secret Key', 'woocommerce-gateway-stripe'), |
|
53
|
53
|
'type' => 'text', |
|
54
|
|
- 'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ), |
|
|
54
|
+ 'description' => __('Get your API keys from your stripe account.', 'woocommerce-gateway-stripe'), |
|
55
|
55
|
'default' => '', |
|
56
|
56
|
'desc_tip' => true, |
|
57
|
57
|
), |
|
58
|
58
|
'publishable_key' => array( |
|
59
|
|
- 'title' => __( 'Live Publishable Key', 'woocommerce-gateway-stripe' ), |
|
|
59
|
+ 'title' => __('Live Publishable Key', 'woocommerce-gateway-stripe'), |
|
60
|
60
|
'type' => 'text', |
|
61
|
|
- 'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ), |
|
|
61
|
+ 'description' => __('Get your API keys from your stripe account.', 'woocommerce-gateway-stripe'), |
|
62
|
62
|
'default' => '', |
|
63
|
63
|
'desc_tip' => true, |
|
64
|
64
|
), |
|
65
|
65
|
'capture' => array( |
|
66
|
|
- 'title' => __( 'Capture', 'woocommerce-gateway-stripe' ), |
|
67
|
|
- 'label' => __( 'Capture charge immediately', 'woocommerce-gateway-stripe' ), |
|
|
66
|
+ 'title' => __('Capture', 'woocommerce-gateway-stripe'), |
|
|
67
|
+ 'label' => __('Capture charge immediately', 'woocommerce-gateway-stripe'), |
|
68
|
68
|
'type' => 'checkbox', |
|
69
|
|
- 'description' => __( 'Whether or not to immediately capture the charge. When unchecked, the charge issues an authorization and will need to be captured later. Uncaptured charges expire in 7 days.', 'woocommerce-gateway-stripe' ), |
|
|
69
|
+ 'description' => __('Whether or not to immediately capture the charge. When unchecked, the charge issues an authorization and will need to be captured later. Uncaptured charges expire in 7 days.', 'woocommerce-gateway-stripe'), |
|
70
|
70
|
'default' => 'yes', |
|
71
|
71
|
'desc_tip' => true, |
|
72
|
72
|
), |
|
73
|
73
|
'stripe_checkout' => array( |
|
74
|
|
- 'title' => __( 'Stripe Checkout', 'woocommerce-gateway-stripe' ), |
|
75
|
|
- 'label' => __( 'Enable Stripe Checkout', 'woocommerce-gateway-stripe' ), |
|
|
74
|
+ 'title' => __('Stripe Checkout', 'woocommerce-gateway-stripe'), |
|
|
75
|
+ 'label' => __('Enable Stripe Checkout', 'woocommerce-gateway-stripe'), |
|
76
|
76
|
'type' => 'checkbox', |
|
77
|
|
- 'description' => __( 'If enabled, this option shows a "pay" button and modal credit card form on the checkout, instead of credit card fields directly on the page.', 'woocommerce-gateway-stripe' ), |
|
|
77
|
+ 'description' => __('If enabled, this option shows a "pay" button and modal credit card form on the checkout, instead of credit card fields directly on the page.', 'woocommerce-gateway-stripe'), |
|
78
|
78
|
'default' => 'no', |
|
79
|
79
|
'desc_tip' => true, |
|
80
|
80
|
), |
|
81
|
81
|
'allow_remember_me' => array( |
|
82
|
|
- 'title' => __( 'Allow Remember Me', 'woocommerce-gateway-stripe' ), |
|
83
|
|
- 'label' => __( 'Enable Remember Me', 'woocommerce-gateway-stripe' ), |
|
|
82
|
+ 'title' => __('Allow Remember Me', 'woocommerce-gateway-stripe'), |
|
|
83
|
+ 'label' => __('Enable Remember Me', 'woocommerce-gateway-stripe'), |
|
84
|
84
|
'type' => 'checkbox', |
|
85
|
|
- 'description' => __( 'If enabled, this option shows a "Remember Me" checkbox which when checked by the customer will persist their details.', 'woocommerce-gateway-stripe' ), |
|
|
85
|
+ 'description' => __('If enabled, this option shows a "Remember Me" checkbox which when checked by the customer will persist their details.', 'woocommerce-gateway-stripe'), |
|
86
|
86
|
'default' => 'yes', |
|
87
|
87
|
'desc_tip' => true, |
|
88
|
88
|
), |
|
89
|
89
|
'stripe_checkout_locale' => array( |
|
90
|
|
- 'title' => __( 'Stripe Checkout locale', 'woocommerce-gateway-stripe' ), |
|
|
90
|
+ 'title' => __('Stripe Checkout locale', 'woocommerce-gateway-stripe'), |
|
91
|
91
|
'type' => 'select', |
|
92
|
92
|
'class' => 'wc-enhanced-select', |
|
93
|
|
- 'description' => __( 'Language to display in Stripe Checkout modal. Specify Auto to display Checkout in the user\'s preferred language, if available. English will be used by default.', 'woocommerce-gateway-stripe' ), |
|
|
93
|
+ 'description' => __('Language to display in Stripe Checkout modal. Specify Auto to display Checkout in the user\'s preferred language, if available. English will be used by default.', 'woocommerce-gateway-stripe'), |
|
94
|
94
|
'default' => 'en', |
|
95
|
95
|
'desc_tip' => true, |
|
96
|
96
|
'options' => array( |
|
97
|
|
- 'auto' => __( 'Auto', 'woocommerce-gateway-stripe' ), |
|
98
|
|
- 'zh' => __( 'Simplified Chinese', 'woocommerce-gateway-stripe' ), |
|
99
|
|
- 'da' => __( 'Danish', 'woocommerce-gateway-stripe' ), |
|
100
|
|
- 'nl' => __( 'Dutch', 'woocommerce-gateway-stripe' ), |
|
101
|
|
- 'en' => __( 'English', 'woocommerce-gateway-stripe' ), |
|
102
|
|
- 'fi' => __( 'Finnish', 'woocommerce-gateway-stripe' ), |
|
103
|
|
- 'fr' => __( 'French', 'woocommerce-gateway-stripe' ), |
|
104
|
|
- 'de' => __( 'German', 'woocommerce-gateway-stripe' ), |
|
105
|
|
- 'it' => __( 'Italian', 'woocommerce-gateway-stripe' ), |
|
106
|
|
- 'ja' => __( 'Japanese', 'woocommerce-gateway-stripe' ), |
|
107
|
|
- 'no' => __( 'Norwegian', 'woocommerce-gateway-stripe' ), |
|
108
|
|
- 'es' => __( 'Spanish', 'woocommerce-gateway-stripe' ), |
|
109
|
|
- 'sv' => __( 'Swedish', 'woocommerce-gateway-stripe' ), |
|
|
97
|
+ 'auto' => __('Auto', 'woocommerce-gateway-stripe'), |
|
|
98
|
+ 'zh' => __('Simplified Chinese', 'woocommerce-gateway-stripe'), |
|
|
99
|
+ 'da' => __('Danish', 'woocommerce-gateway-stripe'), |
|
|
100
|
+ 'nl' => __('Dutch', 'woocommerce-gateway-stripe'), |
|
|
101
|
+ 'en' => __('English', 'woocommerce-gateway-stripe'), |
|
|
102
|
+ 'fi' => __('Finnish', 'woocommerce-gateway-stripe'), |
|
|
103
|
+ 'fr' => __('French', 'woocommerce-gateway-stripe'), |
|
|
104
|
+ 'de' => __('German', 'woocommerce-gateway-stripe'), |
|
|
105
|
+ 'it' => __('Italian', 'woocommerce-gateway-stripe'), |
|
|
106
|
+ 'ja' => __('Japanese', 'woocommerce-gateway-stripe'), |
|
|
107
|
+ 'no' => __('Norwegian', 'woocommerce-gateway-stripe'), |
|
|
108
|
+ 'es' => __('Spanish', 'woocommerce-gateway-stripe'), |
|
|
109
|
+ 'sv' => __('Swedish', 'woocommerce-gateway-stripe'), |
|
110
|
110
|
), |
|
111
|
111
|
), |
|
112
|
112
|
'stripe_bitcoin' => array( |
|
113
|
|
- 'title' => __( 'Bitcoin Currency', 'woocommerce-gateway-stripe' ), |
|
114
|
|
- 'label' => __( 'Enable Bitcoin Currency', 'woocommerce-gateway-stripe' ), |
|
|
113
|
+ 'title' => __('Bitcoin Currency', 'woocommerce-gateway-stripe'), |
|
|
114
|
+ 'label' => __('Enable Bitcoin Currency', 'woocommerce-gateway-stripe'), |
|
115
|
115
|
'type' => 'checkbox', |
|
116
|
|
- 'description' => __( 'If enabled, an option to accept bitcoin will show on the checkout modal. Note: Stripe Checkout needs to be enabled and store currency must be set to USD.', 'woocommerce-gateway-stripe' ), |
|
|
116
|
+ 'description' => __('If enabled, an option to accept bitcoin will show on the checkout modal. Note: Stripe Checkout needs to be enabled and store currency must be set to USD.', 'woocommerce-gateway-stripe'), |
|
117
|
117
|
'default' => 'no', |
|
118
|
118
|
'desc_tip' => true, |
|
119
|
119
|
), |
|
120
|
120
|
'stripe_checkout_image' => array( |
|
121
|
|
- 'title' => __( 'Stripe Checkout Image', 'woocommerce-gateway-stripe' ), |
|
122
|
|
- 'description' => __( 'Optionally enter the URL to a 128x128px image of your brand or product. e.g. <code>https://yoursite.com/wp-content/uploads/2013/09/yourimage.jpg</code>', 'woocommerce-gateway-stripe' ), |
|
|
121
|
+ 'title' => __('Stripe Checkout Image', 'woocommerce-gateway-stripe'), |
|
|
122
|
+ 'description' => __('Optionally enter the URL to a 128x128px image of your brand or product. e.g. <code>https://yoursite.com/wp-content/uploads/2013/09/yourimage.jpg</code>', 'woocommerce-gateway-stripe'), |
|
123
|
123
|
'type' => 'text', |
|
124
|
124
|
'default' => '', |
|
125
|
125
|
'desc_tip' => true, |
|
126
|
126
|
), |
|
127
|
127
|
'request_payment_api' => array( |
|
128
|
|
- 'title' => __( 'Payment Request API', 'woocommerce-gateway-stripe' ), |
|
129
|
|
- 'label' => __( 'Enable Payment Request API', 'woocommerce-gateway-stripe' ), |
|
|
128
|
+ 'title' => __('Payment Request API', 'woocommerce-gateway-stripe'), |
|
|
129
|
+ 'label' => __('Enable Payment Request API', 'woocommerce-gateway-stripe'), |
|
130
|
130
|
'type' => 'checkbox', |
|
131
|
|
- 'description' => __( 'If enabled, users will be able to pay using the Payment Request API if supported by the browser.', 'woocommerce-gateway-stripe' ), |
|
|
131
|
+ 'description' => __('If enabled, users will be able to pay using the Payment Request API if supported by the browser.', 'woocommerce-gateway-stripe'), |
|
132
|
132
|
'default' => 'no', |
|
133
|
133
|
'desc_tip' => true, |
|
134
|
134
|
), |
|
135
|
135
|
'apple_pay' => array( |
|
136
|
|
- 'title' => __( 'Apple Pay', 'woocommerce-gateway-stripe' ), |
|
137
|
|
- 'label' => __( 'Enable Apple Pay', 'woocommerce-gateway-stripe' ), |
|
|
136
|
+ 'title' => __('Apple Pay', 'woocommerce-gateway-stripe'), |
|
|
137
|
+ 'label' => __('Enable Apple Pay', 'woocommerce-gateway-stripe'), |
|
138
|
138
|
'type' => 'checkbox', |
|
139
|
|
- 'description' => __( 'If enabled, users will be able to pay with Apple Pay.', 'woocommerce-gateway-stripe' ), |
|
|
139
|
+ 'description' => __('If enabled, users will be able to pay with Apple Pay.', 'woocommerce-gateway-stripe'), |
|
140
|
140
|
'default' => 'no', |
|
141
|
141
|
'desc_tip' => true, |
|
142
|
142
|
), |
|
143
|
143
|
'saved_cards' => array( |
|
144
|
|
- 'title' => __( 'Saved Cards', 'woocommerce-gateway-stripe' ), |
|
145
|
|
- 'label' => __( 'Enable Payment via Saved Cards', 'woocommerce-gateway-stripe' ), |
|
|
144
|
+ 'title' => __('Saved Cards', 'woocommerce-gateway-stripe'), |
|
|
145
|
+ 'label' => __('Enable Payment via Saved Cards', 'woocommerce-gateway-stripe'), |
|
146
|
146
|
'type' => 'checkbox', |
|
147
|
|
- 'description' => __( 'If enabled, users will be able to pay with a saved card during checkout. Card details are saved on Stripe servers, not on your store.', 'woocommerce-gateway-stripe' ), |
|
|
147
|
+ 'description' => __('If enabled, users will be able to pay with a saved card during checkout. Card details are saved on Stripe servers, not on your store.', 'woocommerce-gateway-stripe'), |
|
148
|
148
|
'default' => 'no', |
|
149
|
149
|
'desc_tip' => true, |
|
150
|
150
|
), |
|
151
|
151
|
'logging' => array( |
|
152
|
|
- 'title' => __( 'Logging', 'woocommerce-gateway-stripe' ), |
|
153
|
|
- 'label' => __( 'Log debug messages', 'woocommerce-gateway-stripe' ), |
|
|
152
|
+ 'title' => __('Logging', 'woocommerce-gateway-stripe'), |
|
|
153
|
+ 'label' => __('Log debug messages', 'woocommerce-gateway-stripe'), |
|
154
|
154
|
'type' => 'checkbox', |
|
155
|
|
- 'description' => __( 'Save debug messages to the WooCommerce System Status log.', 'woocommerce-gateway-stripe' ), |
|
|
155
|
+ 'description' => __('Save debug messages to the WooCommerce System Status log.', 'woocommerce-gateway-stripe'), |
|
156
|
156
|
'default' => 'no', |
|
157
|
157
|
'desc_tip' => true, |
|
158
|
158
|
), |