Completed
Pull Request — master (#242)
by Rodrigo
02:24
created
includes/settings-stripe.php 1 patch
Spacing   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -1,184 +1,184 @@
 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
 		'stripe_checkout_locale' => array(
89
-			'title'       => __( 'Stripe Checkout locale', 'woocommerce-gateway-stripe' ),
89
+			'title'       => __('Stripe Checkout locale', 'woocommerce-gateway-stripe'),
90 90
 			'type'        => 'select',
91 91
 			'class'       => 'wc-enhanced-select',
92
-			'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' ),
92
+			'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 93
 			'default'     => 'en',
94 94
 			'desc_tip'    => true,
95 95
 			'options'     => array(
96
-				'auto' => __( 'Auto', 'woocommerce-gateway-stripe' ),
97
-				'zh'   => __( 'Simplified Chinese', 'woocommerce-gateway-stripe' ),
98
-				'da'   => __( 'Danish', 'woocommerce-gateway-stripe' ),
99
-				'nl'   => __( 'Dutch', 'woocommerce-gateway-stripe' ),
100
-				'en'   => __( 'English', 'woocommerce-gateway-stripe' ),
101
-				'fi'   => __( 'Finnish', 'woocommerce-gateway-stripe' ),
102
-				'fr'   => __( 'French', 'woocommerce-gateway-stripe' ),
103
-				'de'   => __( 'German', 'woocommerce-gateway-stripe' ),
104
-				'it'   => __( 'Italian', 'woocommerce-gateway-stripe' ),
105
-				'ja'   => __( 'Japanese', 'woocommerce-gateway-stripe' ),
106
-				'no'   => __( 'Norwegian', 'woocommerce-gateway-stripe' ),
107
-				'es'   => __( 'Spanish', 'woocommerce-gateway-stripe' ),
108
-				'sv'   => __( 'Swedish', 'woocommerce-gateway-stripe' ),
96
+				'auto' => __('Auto', 'woocommerce-gateway-stripe'),
97
+				'zh'   => __('Simplified Chinese', 'woocommerce-gateway-stripe'),
98
+				'da'   => __('Danish', 'woocommerce-gateway-stripe'),
99
+				'nl'   => __('Dutch', 'woocommerce-gateway-stripe'),
100
+				'en'   => __('English', 'woocommerce-gateway-stripe'),
101
+				'fi'   => __('Finnish', 'woocommerce-gateway-stripe'),
102
+				'fr'   => __('French', 'woocommerce-gateway-stripe'),
103
+				'de'   => __('German', 'woocommerce-gateway-stripe'),
104
+				'it'   => __('Italian', 'woocommerce-gateway-stripe'),
105
+				'ja'   => __('Japanese', 'woocommerce-gateway-stripe'),
106
+				'no'   => __('Norwegian', 'woocommerce-gateway-stripe'),
107
+				'es'   => __('Spanish', 'woocommerce-gateway-stripe'),
108
+				'sv'   => __('Swedish', 'woocommerce-gateway-stripe'),
109 109
 			),
110 110
 		),
111 111
 		'stripe_bitcoin' => array(
112
-			'title'       => __( 'Bitcoin Currency', 'woocommerce-gateway-stripe' ),
113
-			'label'       => __( 'Enable Bitcoin Currency', 'woocommerce-gateway-stripe' ),
112
+			'title'       => __('Bitcoin Currency', 'woocommerce-gateway-stripe'),
113
+			'label'       => __('Enable Bitcoin Currency', 'woocommerce-gateway-stripe'),
114 114
 			'type'        => 'checkbox',
115
-			'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' ),
115
+			'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 116
 			'default'     => 'no',
117 117
 			'desc_tip'    => true,
118 118
 		),
119 119
 		'stripe_checkout_image' => array(
120
-			'title'       => __( 'Stripe Checkout Image', 'woocommerce-gateway-stripe' ),
121
-			'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' ),
120
+			'title'       => __('Stripe Checkout Image', 'woocommerce-gateway-stripe'),
121
+			'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'),
122 122
 			'type'        => 'text',
123 123
 			'default'     => '',
124 124
 			'desc_tip'    => true,
125 125
 		),
126 126
 		'request_payment_api' => array(
127
-			'title'       => __( 'Payment Request API', 'woocommerce-gateway-stripe' ),
128
-			'label'       => __( 'Enable Payment Request API', 'woocommerce-gateway-stripe' ),
127
+			'title'       => __('Payment Request API', 'woocommerce-gateway-stripe'),
128
+			'label'       => __('Enable Payment Request API', 'woocommerce-gateway-stripe'),
129 129
 			'type'        => 'checkbox',
130
-			'description' => __( 'If enabled, users will be able to pay using the Payment Request API if supported by the browser.', 'woocommerce-gateway-stripe' ),
130
+			'description' => __('If enabled, users will be able to pay using the Payment Request API if supported by the browser.', 'woocommerce-gateway-stripe'),
131 131
 			'default'     => 'no',
132 132
 			'desc_tip'    => true,
133 133
 		),
134 134
 		'apple_pay' => array(
135
-			'title'       => __( 'Apple Pay', 'woocommerce-gateway-stripe' ),
136
-			'label'       => sprintf( __( 'Enable Apple Pay. %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>' ),
135
+			'title'       => __('Apple Pay', 'woocommerce-gateway-stripe'),
136
+			'label'       => sprintf(__('Enable Apple Pay. %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>'),
137 137
 			'type'        => 'checkbox',
138
-			'description' => __( 'If enabled, users will be able to pay with Apple Pay.', 'woocommerce-gateway-stripe' ),
138
+			'description' => __('If enabled, users will be able to pay with Apple Pay.', 'woocommerce-gateway-stripe'),
139 139
 			'default'     => 'yes',
140 140
 			'desc_tip'    => true,
141 141
 		),
142 142
 		'apple_pay_button' => array(
143
-			'title'       => __( 'Apple Pay Button Style', 'woocommerce-gateway-stripe' ),
144
-			'label'       => __( 'Button Style', 'woocommerce-gateway-stripe' ),
143
+			'title'       => __('Apple Pay Button Style', 'woocommerce-gateway-stripe'),
144
+			'label'       => __('Button Style', 'woocommerce-gateway-stripe'),
145 145
 			'type'        => 'select',
146
-			'description' => __( 'Select the button style you would like to show.', 'woocommerce-gateway-stripe' ),
146
+			'description' => __('Select the button style you would like to show.', 'woocommerce-gateway-stripe'),
147 147
 			'default'     => 'black',
148 148
 			'desc_tip'    => true,
149 149
 			'options'     => array(
150
-				'black' => __( 'Black', 'woocommerce-gateway-stripe' ),
151
-				'white' => __( 'White', 'woocommerce-gateway-stripe' ),
150
+				'black' => __('Black', 'woocommerce-gateway-stripe'),
151
+				'white' => __('White', 'woocommerce-gateway-stripe'),
152 152
 			),
153 153
 		),
154 154
 		'apple_pay_button_lang' => array(
155
-			'title'       => __( 'Apple Pay Button Language', 'woocommerce-gateway-stripe' ),
156
-			'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' ),
155
+			'title'       => __('Apple Pay Button Language', 'woocommerce-gateway-stripe'),
156
+			'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'),
157 157
 			'type'        => 'text',
158 158
 			'default'     => 'en',
159 159
 			'desc_tip'    => false,
160 160
 		),
161 161
 		'saved_cards' => array(
162
-			'title'       => __( 'Saved Cards', 'woocommerce-gateway-stripe' ),
163
-			'label'       => __( 'Enable Payment via Saved Cards', 'woocommerce-gateway-stripe' ),
162
+			'title'       => __('Saved Cards', 'woocommerce-gateway-stripe'),
163
+			'label'       => __('Enable Payment via Saved Cards', 'woocommerce-gateway-stripe'),
164 164
 			'type'        => 'checkbox',
165
-			'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' ),
165
+			'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'),
166 166
 			'default'     => 'no',
167 167
 			'desc_tip'    => true,
168 168
 		),
169 169
 		'always_save_cards' => array(
170
-			'title'       => __( 'Always Save Cards', 'woocommerce-gateway-stripe' ),
171
-			'label'       => __( 'Save cards without asking the user', 'woocommerce-gateway-stripe' ),
170
+			'title'       => __('Always Save Cards', 'woocommerce-gateway-stripe'),
171
+			'label'       => __('Save cards without asking the user', 'woocommerce-gateway-stripe'),
172 172
 			'type'        => 'checkbox',
173
-			'description' => __( 'If enabled, whenever a customer uses a credit card it will be saved without first asking. When this option is not enabled, the default behavior is to ask the user by showing a checkbox during checkout.', 'woocommerce-gateway-stripe' ),
173
+			'description' => __('If enabled, whenever a customer uses a credit card it will be saved without first asking. When this option is not enabled, the default behavior is to ask the user by showing a checkbox during checkout.', 'woocommerce-gateway-stripe'),
174 174
 			'default'     => 'no',
175 175
 			'desc_tip'    => true,
176 176
 		),
177 177
 		'logging' => array(
178
-			'title'       => __( 'Logging', 'woocommerce-gateway-stripe' ),
179
-			'label'       => __( 'Log debug messages', 'woocommerce-gateway-stripe' ),
178
+			'title'       => __('Logging', 'woocommerce-gateway-stripe'),
179
+			'label'       => __('Log debug messages', 'woocommerce-gateway-stripe'),
180 180
 			'type'        => 'checkbox',
181
-			'description' => __( 'Save debug messages to the WooCommerce System Status log.', 'woocommerce-gateway-stripe' ),
181
+			'description' => __('Save debug messages to the WooCommerce System Status log.', 'woocommerce-gateway-stripe'),
182 182
 			'default'     => 'no',
183 183
 			'desc_tip'    => true,
184 184
 		),
Please login to merge, or discard this patch.