Completed
Push — master ( e9289d...29ee89 )
by Roy
03:22
created
includes/admin/stripe-settings.php 1 patch
Spacing   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -1,189 +1,189 @@
 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
 		'webhook' => array(
30
-			'title'       => __( 'Webhook Endpoints', 'woocommerce-gateway-stripe' ),
30
+			'title'       => __('Webhook Endpoints', 'woocommerce-gateway-stripe'),
31 31
 			'type'        => 'title',
32 32
 			/* translators: webhook URL */
33 33
 			'description' => $this->display_admin_settings_webhook_description(),
34 34
 		),
35 35
 		'testmode' => array(
36
-			'title'       => __( 'Test mode', 'woocommerce-gateway-stripe' ),
37
-			'label'       => __( 'Enable Test Mode', 'woocommerce-gateway-stripe' ),
36
+			'title'       => __('Test mode', 'woocommerce-gateway-stripe'),
37
+			'label'       => __('Enable Test Mode', 'woocommerce-gateway-stripe'),
38 38
 			'type'        => 'checkbox',
39
-			'description' => __( 'Place the payment gateway in test mode using test API keys.', 'woocommerce-gateway-stripe' ),
39
+			'description' => __('Place the payment gateway in test mode using test API keys.', 'woocommerce-gateway-stripe'),
40 40
 			'default'     => 'yes',
41 41
 			'desc_tip'    => true,
42 42
 		),
43 43
 		'test_publishable_key' => array(
44
-			'title'       => __( 'Test Publishable Key', 'woocommerce-gateway-stripe' ),
44
+			'title'       => __('Test Publishable Key', 'woocommerce-gateway-stripe'),
45 45
 			'type'        => 'password',
46
-			'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
46
+			'description' => __('Get your API keys from your stripe account.', 'woocommerce-gateway-stripe'),
47 47
 			'default'     => '',
48 48
 			'desc_tip'    => true,
49 49
 		),
50 50
 		'test_secret_key' => array(
51
-			'title'       => __( 'Test Secret Key', 'woocommerce-gateway-stripe' ),
51
+			'title'       => __('Test Secret Key', 'woocommerce-gateway-stripe'),
52 52
 			'type'        => 'password',
53
-			'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
53
+			'description' => __('Get your API keys from your stripe account.', 'woocommerce-gateway-stripe'),
54 54
 			'default'     => '',
55 55
 			'desc_tip'    => true,
56 56
 		),
57 57
 		'publishable_key' => array(
58
-			'title'       => __( 'Live Publishable Key', 'woocommerce-gateway-stripe' ),
58
+			'title'       => __('Live Publishable Key', 'woocommerce-gateway-stripe'),
59 59
 			'type'        => 'password',
60
-			'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
60
+			'description' => __('Get your API keys from your stripe account.', 'woocommerce-gateway-stripe'),
61 61
 			'default'     => '',
62 62
 			'desc_tip'    => true,
63 63
 		),
64 64
 		'secret_key' => array(
65
-			'title'       => __( 'Live Secret Key', 'woocommerce-gateway-stripe' ),
65
+			'title'       => __('Live Secret Key', 'woocommerce-gateway-stripe'),
66 66
 			'type'        => 'password',
67
-			'description' => __( 'Get your API keys from your stripe account.', 'woocommerce-gateway-stripe' ),
67
+			'description' => __('Get your API keys from your stripe account.', 'woocommerce-gateway-stripe'),
68 68
 			'default'     => '',
69 69
 			'desc_tip'    => true,
70 70
 		),
71 71
 		'inline_cc_form' => array(
72
-			'title'       => __( 'Inline Credit Card Form', 'woocommerce-gateway-stripe' ),
72
+			'title'       => __('Inline Credit Card Form', 'woocommerce-gateway-stripe'),
73 73
 			'type'        => 'checkbox',
74
-			'description' => __( 'Choose the style you want to show for your credit card form. When unchecked, the credit card form will display separate credit card number field, expiry date field and cvc field.', 'woocommerce-gateway-stripe' ),
74
+			'description' => __('Choose the style you want to show for your credit card form. When unchecked, the credit card form will display separate credit card number field, expiry date field and cvc field.', 'woocommerce-gateway-stripe'),
75 75
 			'default'     => 'no',
76 76
 			'desc_tip'    => true,
77 77
 		),
78 78
 		'statement_descriptor' => array(
79
-			'title'       => __( 'Statement Descriptor', 'woocommerce-gateway-stripe' ),
79
+			'title'       => __('Statement Descriptor', 'woocommerce-gateway-stripe'),
80 80
 			'type'        => 'text',
81
-			'description' => __( 'This may be up to 22 characters. The statement description must contain at least one letter, may not include ><"\' characters, and will appear on your customer\'s statement in capital letters.', 'woocommerce-gateway-stripe' ),
81
+			'description' => __('This may be up to 22 characters. The statement description must contain at least one letter, may not include ><"\' characters, and will appear on your customer\'s statement in capital letters.', 'woocommerce-gateway-stripe'),
82 82
 			'default'     => '',
83 83
 			'desc_tip'    => true,
84 84
 		),
85 85
 		'capture' => array(
86
-			'title'       => __( 'Capture', 'woocommerce-gateway-stripe' ),
87
-			'label'       => __( 'Capture charge immediately', 'woocommerce-gateway-stripe' ),
86
+			'title'       => __('Capture', 'woocommerce-gateway-stripe'),
87
+			'label'       => __('Capture charge immediately', 'woocommerce-gateway-stripe'),
88 88
 			'type'        => 'checkbox',
89
-			'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' ),
89
+			'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'),
90 90
 			'default'     => 'yes',
91 91
 			'desc_tip'    => true,
92 92
 		),
93 93
 		'three_d_secure' => array(
94
-			'title'       => __( '3D Secure', 'woocommerce-gateway-stripe' ),
95
-			'label'       => __( 'Require 3D Secure when applicable', 'woocommerce-gateway-stripe' ),
94
+			'title'       => __('3D Secure', 'woocommerce-gateway-stripe'),
95
+			'label'       => __('Require 3D Secure when applicable', 'woocommerce-gateway-stripe'),
96 96
 			'type'        => 'checkbox',
97
-			'description' => __( 'Some payment methods have 3D Secure feature. This is an extra security layer for your store. Choose how to handle payments when 3D Secure is recommended. Enabling would require customers to use 3D Secure when recommended.', 'woocommerce-gateway-stripe' ),
97
+			'description' => __('Some payment methods have 3D Secure feature. This is an extra security layer for your store. Choose how to handle payments when 3D Secure is recommended. Enabling would require customers to use 3D Secure when recommended.', 'woocommerce-gateway-stripe'),
98 98
 			'default'     => 'yes',
99 99
 			'desc_tip'    => true,
100 100
 		),
101 101
 		'stripe_checkout' => array(
102
-			'title'       => __( 'Stripe Modal Checkout', 'woocommerce-gateway-stripe' ),
103
-			'label'       => __( 'Enable Stripe Checkout', 'woocommerce-gateway-stripe' ),
102
+			'title'       => __('Stripe Modal Checkout', 'woocommerce-gateway-stripe'),
103
+			'label'       => __('Enable Stripe Checkout', 'woocommerce-gateway-stripe'),
104 104
 			'type'        => 'checkbox',
105
-			'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. We recommend you leave this disabled and use the embedded form as that is the preferred method.', 'woocommerce-gateway-stripe' ),
105
+			'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. We recommend you leave this disabled and use the embedded form as that is the preferred method.', 'woocommerce-gateway-stripe'),
106 106
 			'default'     => 'no',
107 107
 			'desc_tip'    => true,
108 108
 		),
109 109
 		'stripe_bitcoin' => array(
110
-			'title'       => __( 'Bitcoin Currency', 'woocommerce-gateway-stripe' ),
111
-			'label'       => __( 'Enable Bitcoin Currency', 'woocommerce-gateway-stripe' ),
110
+			'title'       => __('Bitcoin Currency', 'woocommerce-gateway-stripe'),
111
+			'label'       => __('Enable Bitcoin Currency', 'woocommerce-gateway-stripe'),
112 112
 			'type'        => 'checkbox',
113
-			'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' ),
113
+			'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'),
114 114
 			'default'     => 'no',
115 115
 			'desc_tip'    => true,
116 116
 		),
117 117
 		'stripe_checkout_image' => array(
118
-			'title'       => __( 'Stripe Checkout Image', 'woocommerce-gateway-stripe' ),
119
-			'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' ),
118
+			'title'       => __('Stripe Checkout Image', 'woocommerce-gateway-stripe'),
119
+			'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 120
 			'type'        => 'text',
121 121
 			'default'     => '',
122 122
 			'desc_tip'    => true,
123 123
 		),
124 124
 		'stripe_checkout_description' => array(
125
-			'title'       => __( 'Stripe Checkout Description', 'woocommerce-gateway-stripe' ),
125
+			'title'       => __('Stripe Checkout Description', 'woocommerce-gateway-stripe'),
126 126
 			'type'        => 'text',
127
-			'description' => __( 'Shows a description of your store on Stripe Modal Checkout.', 'woocommerce-gateway-stripe' ),
127
+			'description' => __('Shows a description of your store on Stripe Modal Checkout.', 'woocommerce-gateway-stripe'),
128 128
 			'default'     => '',
129 129
 			'desc_tip'    => true,
130 130
 		),
131 131
 		'payment_request' => array(
132
-			'title'       => __( 'Payment Request Buttons', 'woocommerce-gateway-stripe' ),
132
+			'title'       => __('Payment Request Buttons', 'woocommerce-gateway-stripe'),
133 133
 			/* translators: 1) br tag 2) opening anchor tag 3) closing anchor tag */
134
-			'label'       => sprintf( __( 'Enable Payment Request Buttons. (Apple Pay/Chrome Payment Request API) %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>' ),
134
+			'label'       => sprintf(__('Enable Payment Request Buttons. (Apple Pay/Chrome Payment Request API) %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 135
 			'type'        => 'checkbox',
136
-			'description' => __( 'If enabled, users will be able to pay using Apple Pay or Chrome Payment Request if supported by the browser.', 'woocommerce-gateway-stripe' ),
136
+			'description' => __('If enabled, users will be able to pay using Apple Pay or Chrome Payment Request if supported by the browser.', 'woocommerce-gateway-stripe'),
137 137
 			'default'     => 'yes',
138 138
 			'desc_tip'    => true,
139 139
 		),
140 140
 		'payment_request_button_type' => array(
141
-			'title'       => __( 'Payment Request Button Type', 'woocommerce-gateway-stripe' ),
142
-			'label'       => __( 'Button Type', 'woocommerce-gateway-stripe' ),
141
+			'title'       => __('Payment Request Button Type', 'woocommerce-gateway-stripe'),
142
+			'label'       => __('Button Type', 'woocommerce-gateway-stripe'),
143 143
 			'type'        => 'select',
144
-			'description' => __( 'Select the button type you would like to show.', 'woocommerce-gateway-stripe' ),
144
+			'description' => __('Select the button type you would like to show.', 'woocommerce-gateway-stripe'),
145 145
 			'default'     => 'buy',
146 146
 			'desc_tip'    => true,
147 147
 			'options'     => array(
148
-				'default' => __( 'Default', 'woocommerce-gateway-stripe' ),
149
-				'buy'     => __( 'Buy', 'woocommerce-gateway-stripe' ),
150
-				'donate'  => __( 'Donate', 'woocommerce-gateway-stripe' ),
148
+				'default' => __('Default', 'woocommerce-gateway-stripe'),
149
+				'buy'     => __('Buy', 'woocommerce-gateway-stripe'),
150
+				'donate'  => __('Donate', 'woocommerce-gateway-stripe'),
151 151
 			),
152 152
 		),
153 153
 		'payment_request_button_theme' => array(
154
-			'title'       => __( 'Payment Request Button Theme', 'woocommerce-gateway-stripe' ),
155
-			'label'       => __( 'Button Theme', 'woocommerce-gateway-stripe' ),
154
+			'title'       => __('Payment Request Button Theme', 'woocommerce-gateway-stripe'),
155
+			'label'       => __('Button Theme', 'woocommerce-gateway-stripe'),
156 156
 			'type'        => 'select',
157
-			'description' => __( 'Select the button theme you would like to show.', 'woocommerce-gateway-stripe' ),
157
+			'description' => __('Select the button theme you would like to show.', 'woocommerce-gateway-stripe'),
158 158
 			'default'     => 'dark',
159 159
 			'desc_tip'    => true,
160 160
 			'options'     => array(
161
-				'dark'          => __( 'Dark', 'woocommerce-gateway-stripe' ),
162
-				'light'         => __( 'Light', 'woocommerce-gateway-stripe' ),
163
-				'light-outline' => __( 'Light-Outline', 'woocommerce-gateway-stripe' ),
161
+				'dark'          => __('Dark', 'woocommerce-gateway-stripe'),
162
+				'light'         => __('Light', 'woocommerce-gateway-stripe'),
163
+				'light-outline' => __('Light-Outline', 'woocommerce-gateway-stripe'),
164 164
 			),
165 165
 		),
166 166
 		'payment_request_button_height' => array(
167
-			'title'       => __( 'Payment Request Button Height', 'woocommerce-gateway-stripe' ),
168
-			'label'       => __( 'Button Height', 'woocommerce-gateway-stripe' ),
167
+			'title'       => __('Payment Request Button Height', 'woocommerce-gateway-stripe'),
168
+			'label'       => __('Button Height', 'woocommerce-gateway-stripe'),
169 169
 			'type'        => 'text',
170
-			'description' => __( 'Enter the height you would like the button to be in pixels. Width will always be 100%.', 'woocommerce-gateway-stripe' ),
170
+			'description' => __('Enter the height you would like the button to be in pixels. Width will always be 100%.', 'woocommerce-gateway-stripe'),
171 171
 			'default'     => '44',
172 172
 			'desc_tip'    => true,
173 173
 		),
174 174
 		'saved_cards' => array(
175
-			'title'       => __( 'Saved Cards', 'woocommerce-gateway-stripe' ),
176
-			'label'       => __( 'Enable Payment via Saved Cards', 'woocommerce-gateway-stripe' ),
175
+			'title'       => __('Saved Cards', 'woocommerce-gateway-stripe'),
176
+			'label'       => __('Enable Payment via Saved Cards', 'woocommerce-gateway-stripe'),
177 177
 			'type'        => 'checkbox',
178
-			'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' ),
178
+			'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'),
179 179
 			'default'     => 'no',
180 180
 			'desc_tip'    => true,
181 181
 		),
182 182
 		'logging' => array(
183
-			'title'       => __( 'Logging', 'woocommerce-gateway-stripe' ),
184
-			'label'       => __( 'Log debug messages', 'woocommerce-gateway-stripe' ),
183
+			'title'       => __('Logging', 'woocommerce-gateway-stripe'),
184
+			'label'       => __('Log debug messages', 'woocommerce-gateway-stripe'),
185 185
 			'type'        => 'checkbox',
186
-			'description' => __( 'Save debug messages to the WooCommerce System Status log.', 'woocommerce-gateway-stripe' ),
186
+			'description' => __('Save debug messages to the WooCommerce System Status log.', 'woocommerce-gateway-stripe'),
187 187
 			'default'     => 'no',
188 188
 			'desc_tip'    => true,
189 189
 		),
Please login to merge, or discard this patch.