Completed
Pull Request — master (#153)
by Matty
02:41
created
includes/settings-stripe.php 1 patch
Spacing   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -1,149 +1,149 @@  discard block
 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
 		'statement_descriptor' => array(
66
-			'title'       => __( 'Statement Descriptor', 'woocommerce-gateway-stripe' ),
66
+			'title'       => __('Statement Descriptor', 'woocommerce-gateway-stripe'),
67 67
 			'type'        => 'text',
68
-			'description' => __( 'Extra information about a charge. This will appear on your customer’s credit card statement.', 'woocommerce-gateway-stripe' ),
68
+			'description' => __('Extra information about a charge. This will appear on your customer’s credit card statement.', 'woocommerce-gateway-stripe'),
69 69
 			'default'     => '',
70 70
 			'desc_tip'    => true,
71 71
 		),
72 72
 		'capture' => array(
73
-			'title'       => __( 'Capture', 'woocommerce-gateway-stripe' ),
74
-			'label'       => __( 'Capture charge immediately', 'woocommerce-gateway-stripe' ),
73
+			'title'       => __('Capture', 'woocommerce-gateway-stripe'),
74
+			'label'       => __('Capture charge immediately', 'woocommerce-gateway-stripe'),
75 75
 			'type'        => 'checkbox',
76
-			'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' ),
76
+			'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'),
77 77
 			'default'     => 'yes',
78 78
 			'desc_tip'    => true,
79 79
 		),
80 80
 		'stripe_checkout' => array(
81
-			'title'       => __( 'Stripe Checkout', 'woocommerce-gateway-stripe' ),
82
-			'label'       => __( 'Enable Stripe Checkout', 'woocommerce-gateway-stripe' ),
81
+			'title'       => __('Stripe Checkout', 'woocommerce-gateway-stripe'),
82
+			'label'       => __('Enable Stripe Checkout', 'woocommerce-gateway-stripe'),
83 83
 			'type'        => 'checkbox',
84
-			'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' ),
84
+			'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'),
85 85
 			'default'     => 'no',
86 86
 			'desc_tip'    => true,
87 87
 		),
88 88
 		'allow_remember_me' => array(
89
-			'title'       => __( 'Allow Remember Me', 'woocommerce-gateway-stripe' ),
90
-			'label'       => __( 'Enable Remember Me', 'woocommerce-gateway-stripe' ),
89
+			'title'       => __('Allow Remember Me', 'woocommerce-gateway-stripe'),
90
+			'label'       => __('Enable Remember Me', 'woocommerce-gateway-stripe'),
91 91
 			'type'        => 'checkbox',
92
-			'description' => __( 'If enabled, this option shows a "Remember Me" checkbox which when checked by the customer will persist their details.', 'woocommerce-gateway-stripe' ),
92
+			'description' => __('If enabled, this option shows a "Remember Me" checkbox which when checked by the customer will persist their details.', 'woocommerce-gateway-stripe'),
93 93
 			'default'     => 'yes',
94 94
 			'desc_tip'    => true,
95 95
 		),
96 96
 		'stripe_checkout_locale' => array(
97
-			'title'       => __( 'Stripe Checkout locale', 'woocommerce-gateway-stripe' ),
97
+			'title'       => __('Stripe Checkout locale', 'woocommerce-gateway-stripe'),
98 98
 			'type'        => 'select',
99 99
 			'class'       => 'wc-enhanced-select',
100
-			'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' ),
100
+			'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'),
101 101
 			'default'     => 'en',
102 102
 			'desc_tip'    => true,
103 103
 			'options'     => array(
104
-				'auto' => __( 'Auto', 'woocommerce-gateway-stripe' ),
105
-				'zh'   => __( 'Simplified Chinese', 'woocommerce-gateway-stripe' ),
106
-				'da'   => __( 'Danish', 'woocommerce-gateway-stripe' ),
107
-				'nl'   => __( 'Dutch', 'woocommerce-gateway-stripe' ),
108
-				'en'   => __( 'English', 'woocommerce-gateway-stripe' ),
109
-				'fi'   => __( 'Finnish', 'woocommerce-gateway-stripe' ),
110
-				'fr'   => __( 'French', 'woocommerce-gateway-stripe' ),
111
-				'de'   => __( 'German', 'woocommerce-gateway-stripe' ),
112
-				'it'   => __( 'Italian', 'woocommerce-gateway-stripe' ),
113
-				'ja'   => __( 'Japanese', 'woocommerce-gateway-stripe' ),
114
-				'no'   => __( 'Norwegian', 'woocommerce-gateway-stripe' ),
115
-				'es'   => __( 'Spanish', 'woocommerce-gateway-stripe' ),
116
-				'sv'   => __( 'Swedish', 'woocommerce-gateway-stripe' ),
104
+				'auto' => __('Auto', 'woocommerce-gateway-stripe'),
105
+				'zh'   => __('Simplified Chinese', 'woocommerce-gateway-stripe'),
106
+				'da'   => __('Danish', 'woocommerce-gateway-stripe'),
107
+				'nl'   => __('Dutch', 'woocommerce-gateway-stripe'),
108
+				'en'   => __('English', 'woocommerce-gateway-stripe'),
109
+				'fi'   => __('Finnish', 'woocommerce-gateway-stripe'),
110
+				'fr'   => __('French', 'woocommerce-gateway-stripe'),
111
+				'de'   => __('German', 'woocommerce-gateway-stripe'),
112
+				'it'   => __('Italian', 'woocommerce-gateway-stripe'),
113
+				'ja'   => __('Japanese', 'woocommerce-gateway-stripe'),
114
+				'no'   => __('Norwegian', 'woocommerce-gateway-stripe'),
115
+				'es'   => __('Spanish', 'woocommerce-gateway-stripe'),
116
+				'sv'   => __('Swedish', 'woocommerce-gateway-stripe'),
117 117
 			),
118 118
 		),
119 119
 		'stripe_bitcoin' => array(
120
-			'title'       => __( 'Bitcoin Currency', 'woocommerce-gateway-stripe' ),
121
-			'label'       => __( 'Enable Bitcoin Currency', 'woocommerce-gateway-stripe' ),
120
+			'title'       => __('Bitcoin Currency', 'woocommerce-gateway-stripe'),
121
+			'label'       => __('Enable Bitcoin Currency', 'woocommerce-gateway-stripe'),
122 122
 			'type'        => 'checkbox',
123
-			'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' ),
123
+			'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'),
124 124
 			'default'     => 'no',
125 125
 			'desc_tip'    => true,
126 126
 		),
127 127
 		'stripe_checkout_image' => array(
128
-			'title'       => __( 'Stripe Checkout Image', 'woocommerce-gateway-stripe' ),
129
-			'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' ),
128
+			'title'       => __('Stripe Checkout Image', 'woocommerce-gateway-stripe'),
129
+			'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'),
130 130
 			'type'        => 'text',
131 131
 			'default'     => '',
132 132
 			'desc_tip'    => true,
133 133
 		),
134 134
 		'request_payment_api' => array(
135
-			'title'       => __( 'Payment Request API', 'woocommerce-gateway-stripe' ),
136
-			'label'       => __( 'Enable Payment Request API', 'woocommerce-gateway-stripe' ),
135
+			'title'       => __('Payment Request API', 'woocommerce-gateway-stripe'),
136
+			'label'       => __('Enable Payment Request API', 'woocommerce-gateway-stripe'),
137 137
 			'type'        => 'checkbox',
138
-			'description' => __( 'If enabled, users will be able to pay using the Payment Request API if supported by the browser.', 'woocommerce-gateway-stripe' ),
138
+			'description' => __('If enabled, users will be able to pay using the Payment Request API if supported by the browser.', 'woocommerce-gateway-stripe'),
139 139
 			'default'     => 'no',
140 140
 			'desc_tip'    => true,
141 141
 		),
142 142
 		'apple_pay' => array(
143
-			'title'       => __( 'Apple Pay', 'woocommerce-gateway-stripe' ),
144
-			'label'       => __( 'Enable Apple Pay.', 'woocommerce-gateway-stripe' ),
143
+			'title'       => __('Apple Pay', 'woocommerce-gateway-stripe'),
144
+			'label'       => __('Enable Apple Pay.', 'woocommerce-gateway-stripe'),
145 145
 			'type'        => 'checkbox',
146
-			'description' => sprintf( __( '%1$sBy using Apple Pay, you agree to %2$s and %3$s\'s terms of service.', 'woocommerce-gateway-stripe' ), '<br />', '<a href="https://stripe.com/apple-pay/legal" target="_blank">Stripe</a>', '<a href="https://developer.apple.com/apple-pay/acceptable-use-guidelines-for-websites/" target="_blank">Apple</a>' ),
146
+			'description' => sprintf(__('%1$sBy using Apple Pay, you agree to %2$s and %3$s\'s terms of service.', 'woocommerce-gateway-stripe'), '<br />', '<a href="https://stripe.com/apple-pay/legal" target="_blank">Stripe</a>', '<a href="https://developer.apple.com/apple-pay/acceptable-use-guidelines-for-websites/" target="_blank">Apple</a>'),
147 147
 			'default'     => 'no',
148 148
 			'desc_tip'    => false,
149 149
 		),
@@ -151,37 +151,37 @@  discard block
 block discarded – undo
151 151
 			'type'        => 'apple_pay_domain',
152 152
 		),
153 153
 		'apple_pay_button' => array(
154
-			'title'       => __( 'Apple Pay Button Style', 'woocommerce-gateway-stripe' ),
155
-			'label'       => __( 'Button Style', 'woocommerce-gateway-stripe' ),
154
+			'title'       => __('Apple Pay Button Style', 'woocommerce-gateway-stripe'),
155
+			'label'       => __('Button Style', 'woocommerce-gateway-stripe'),
156 156
 			'type'        => 'select',
157
-			'description' => __( 'Select the button style you would like to show.', 'woocommerce-gateway-stripe' ),
157
+			'description' => __('Select the button style you would like to show.', 'woocommerce-gateway-stripe'),
158 158
 			'default'     => 'black',
159 159
 			'desc_tip'    => true,
160 160
 			'options'     => array(
161
-				'black' => __( 'Black', 'woocommerce-gateway-stripe' ),
162
-				'white' => __( 'White', 'woocommerce-gateway-stripe' ),
161
+				'black' => __('Black', 'woocommerce-gateway-stripe'),
162
+				'white' => __('White', 'woocommerce-gateway-stripe'),
163 163
 			),
164 164
 		),
165 165
 		'apple_pay_button_lang' => array(
166
-			'title'       => __( 'Apple Pay Button Language', 'woocommerce-gateway-stripe' ),
167
-			'description' => __( 'Enter the 2 letter ISO code for the language you would like your Apple Pay Button to display in. Reference available ISO codes here <code>http://www.w3schools.com/tags/ref_language_codes.asp</code>', 'woocommerce-gateway-stripe' ),
166
+			'title'       => __('Apple Pay Button Language', 'woocommerce-gateway-stripe'),
167
+			'description' => __('Enter the 2 letter ISO code for the language you would like your Apple Pay Button to display in. Reference available ISO codes here <code>http://www.w3schools.com/tags/ref_language_codes.asp</code>', 'woocommerce-gateway-stripe'),
168 168
 			'type'        => 'text',
169 169
 			'default'     => 'en',
170 170
 			'desc_tip'    => false,
171 171
 		),
172 172
 		'saved_cards' => array(
173
-			'title'       => __( 'Saved Cards', 'woocommerce-gateway-stripe' ),
174
-			'label'       => __( 'Enable Payment via Saved Cards', 'woocommerce-gateway-stripe' ),
173
+			'title'       => __('Saved Cards', 'woocommerce-gateway-stripe'),
174
+			'label'       => __('Enable Payment via Saved Cards', 'woocommerce-gateway-stripe'),
175 175
 			'type'        => 'checkbox',
176
-			'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' ),
176
+			'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'),
177 177
 			'default'     => 'no',
178 178
 			'desc_tip'    => true,
179 179
 		),
180 180
 		'logging' => array(
181
-			'title'       => __( 'Logging', 'woocommerce-gateway-stripe' ),
182
-			'label'       => __( 'Log debug messages', 'woocommerce-gateway-stripe' ),
181
+			'title'       => __('Logging', 'woocommerce-gateway-stripe'),
182
+			'label'       => __('Log debug messages', 'woocommerce-gateway-stripe'),
183 183
 			'type'        => 'checkbox',
184
-			'description' => __( 'Save debug messages to the WooCommerce System Status log.', 'woocommerce-gateway-stripe' ),
184
+			'description' => __('Save debug messages to the WooCommerce System Status log.', 'woocommerce-gateway-stripe'),
185 185
 			'default'     => 'no',
186 186
 			'desc_tip'    => true,
187 187
 		),
Please login to merge, or discard this patch.