PluginProbe
Tiered Pricing Table for WooCommerce / 2.0
Tiered Pricing Table for WooCommerce v2.0
8.0.2 7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 All 91 releases
← All changes | src/Settings/Settings.php +27 -80 2.2.3 → 2.0 View file →
@@ -47,9 +47,9 @@
47 47 public function initSettings() {
48 48 $this->settings = array(
49 49 [
50 50 'title' => __( 'Tiered price table settings', 'tier-pricing-table' ),
51 - 'desc' => __( 'This controls how tiered pricing table will be displayed in your store',
51 + 'desc' => __( 'This controls what and where tiered pricing table will be displayed at product page',
52 52 'tier-pricing-table' ),
53 53 'id' => self::SETTINGS_PREFIX . 'options',
54 54 'type' => 'title',
55 55 ],
@@ -71,9 +71,8 @@
71 71 'table' => __( 'Table', 'tier-pricing-table' ),
72 72 ],
73 73 'desc' => __( 'Type of displaying', 'tier-pricing-table' ),
74 74 'desc_tip' => true,
75 - 'default' => 'table',
76 75 ],
77 76 [
78 77 'title' => __( 'Tooltip icon color', 'tier-pricing-table' ),
79 78 'id' => self::SETTINGS_PREFIX . 'tooltip_color',
@@ -111,10 +110,8 @@
111 110 'type' => 'select',
112 111 'options' => [
113 112 'woocommerce_before_add_to_cart_button' => __( 'Above buy button', 'tier-pricing-table' ),
114 113 'woocommerce_after_add_to_cart_button' => __( 'Below buy button', 'tier-pricing-table' ),
115 - 'woocommerce_before_add_to_cart_form' => __( 'Above add to cart form', 'tier-pricing-table' ),
116 - 'woocommerce_after_add_to_cart_form' => __( 'Below add to cart form', 'tier-pricing-table' ),
117 114 'woocommerce_single_product_summary' => __( 'Above product title', 'tier-pricing-table' ),
118 115 'woocommerce_before_single_product_summary' => __( 'Before product summary', 'tier-pricing-table' ),
119 116 'woocommerce_after_single_product_summary' => __( 'After product summary', 'tier-pricing-table' ),
120 117 ],
@@ -134,10 +131,9 @@
134 131 'title' => __( 'Quantity text', 'tier-pricing-table' ),
135 132 'id' => self::SETTINGS_PREFIX . 'head_quantity_text',
136 133 'type' => 'text',
137 134 'default' => __( 'Quantity', 'tier-pricing-table' ),
138 - 'desc' => __( 'Name of quantity column. Leave Price text and Quantity text blank to do not show table head',
139 - 'tier-pricing-table' ),
135 + 'desc' => __( 'Name of quantity column', 'tier-pricing-table' ),
140 136 'desc_tip' => true,
141 137 ],
142 138 [
143 139 'title' => __( 'Price text', 'tier-pricing-table' ),
@@ -143,10 +139,9 @@
143 139 'title' => __( 'Price text', 'tier-pricing-table' ),
144 140 'id' => self::SETTINGS_PREFIX . 'head_price_text',
145 141 'type' => 'text',
146 142 'default' => __( 'Price', 'tier-pricing-table' ),
147 - 'desc' => __( 'Name of price column. Leave Price text and Quantity text blank to do not show table head',
148 - 'tier-pricing-table' ),
143 + 'desc' => __( 'Name of price column', 'tier-pricing-table' ),
149 144 'desc_tip' => true,
150 145 ],
151 146 [
152 147 'title' => __( 'CSS class', 'tier-pricing-table' ),
@@ -152,9 +147,9 @@
152 147 'title' => __( 'CSS class', 'tier-pricing-table' ),
153 148 'id' => self::SETTINGS_PREFIX . 'table_css_class',
154 149 'type' => 'text',
155 150 'default' => '',
156 - 'desc' => __( 'Add your own CSS styles for the class. The class would be added to the table.',
151 + 'desc' => __( 'You can add your own css styles for this class. The class will be added to the table',
157 152 'tier-pricing-table' ),
158 153 'desc_tip' => true,
159 154 ],
160 155 [
@@ -160,9 +155,8 @@
160 155 [
161 156 'type' => 'sectionend',
162 157 'id' => self::SETTINGS_PREFIX . 'options'
163 158 ],
164 -
165 159 // Premium Here
166 160 [
167 161 'title' => __( 'Advanced settings', 'tier-pricing-table' ),
168 162 'id' => self::SETTINGS_PREFIX . 'premium_options',
@@ -169,9 +163,9 @@
169 163 'type' => 'title',
170 164 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
171 165 ],
172 166 [
173 - 'title' => __( 'Show Tiered Price in Cart as the Discount', 'tier-pricing-table' ),
167 + 'title' => __( 'Show tiered price in cart as discount', 'tier-pricing-table' ),
174 168 'id' => self::SETTINGS_PREFIX . 'show_discount_in_cart',
175 169 'desc' => __( 'Example:', 'tier-pricing-table' ) . ' <del>10$</del> 8$',
176 170 'type' => 'checkbox',
177 171 'default' => 'yes',
@@ -178,41 +172,18 @@
178 172 'desc_tip' => true,
179 173 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => 'yes' ]
180 174 ],
181 175 [
182 - 'title' => __( 'Enable price formatting on the catalog page, widgets, etc',
183 - 'tier-pricing-table' ),
176 + 'title' => __( 'Use Tiered Price at Catalog', 'tier-pricing-table' ),
184 177 'id' => self::SETTINGS_PREFIX . 'tiered_price_at_catalog',
185 178 'type' => 'checkbox',
186 179 'default' => 'yes',
187 - 'desc' => __( 'Change price formatting on the whole site (show range or minimal price)',
188 - 'tier-pricing-table' ),
180 + 'desc' => __( 'Enable\Disable showing tiered price at catalog', 'tier-pricing-table' ),
189 181 'desc_tip' => true,
190 182 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
191 183 ],
192 184 [
193 - 'title' => __( 'Enable price formatting on product page ', 'tier-pricing-table' ),
194 - 'id' => self::SETTINGS_PREFIX . 'tiered_price_at_product_page',
195 - 'type' => 'checkbox',
196 - 'default' => 'no',
197 - 'desc' => __( 'Change price for product at product page (show range or minimal price)',
198 - 'tier-pricing-table' ),
199 - 'desc_tip' => true,
200 - 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
201 - ],
202 - [
203 - 'title' => __( 'Enable catalog, widget price formatting for variable products',
204 - 'tier-pricing-table' ),
205 - 'id' => self::SETTINGS_PREFIX . 'tiered_price_at_catalog_for_variable',
206 - 'type' => 'checkbox',
207 - 'default' => 'yes',
208 - 'desc' => __( 'Show tiered price at the catalog for variable products. Uses the lowest and the highest prices from all variations',
209 - 'tier-pricing-table' ),
210 - 'desc_tip' => true,
211 - 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
212 - ],
213 - [
214 - 'title' => __( 'Display Tiered Price as', 'tier-pricing-table' ),
185 + 'title' => __( 'Display type as', 'tier-pricing-table' ),
215 186 'id' => self::SETTINGS_PREFIX . 'tiered_price_at_catalog_type',
216 187 'type' => 'select',
217 188 'options' => [
218 189 'range' => __( 'Range (from lowest to highest)', 'tier-pricing-table' ),
@@ -217,9 +188,9 @@
217 188 'options' => [
218 189 'range' => __( 'Range (from lowest to highest)', 'tier-pricing-table' ),
219 190 'lowest' => __( 'Lowest price', 'tier-pricing-table' ),
220 191 ],
221 - 'desc' => __( 'How to Display Tiered Price at The Catalog', 'tier-pricing-table' ),
192 + 'desc' => __( 'How to display price at catalog', 'tier-pricing-table' ),
222 193 'desc_tip' => true,
223 194 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
224 195 ],
225 196 [
@@ -226,9 +197,9 @@
226 197 'title' => __( 'Lowest price prefix', 'tier-pricing-table' ),
227 198 'id' => self::SETTINGS_PREFIX . 'lowest_prefix',
228 199 'type' => 'text',
229 200 'default' => __( 'From', 'tier-pricing-table' ),
230 - 'desc' => __( 'Prefix Before Lowest Tiered Product Price at the Catalog. Example: <b>From 10$</b>',
201 + 'desc' => __( 'Prefix before lowest product price at catalog. Example: <b>From 10$</b>',
231 202 'tier-pricing-table' ),
232 203 'desc_tip' => true,
233 204 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
234 205 ],
@@ -239,9 +210,9 @@
239 210 'default' => 'yes',
240 211 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
241 212 ],
242 213 [
243 - 'title' => __( 'Discount column text', 'tier-pricing-table' ),
214 + 'title' => __( 'Discount text', 'tier-pricing-table' ),
244 215 'id' => self::SETTINGS_PREFIX . 'head_discount_text',
245 216 'type' => 'text',
246 217 'default' => __( 'Discount (%)', 'tier-pricing-table' ),
247 218 'desc' => __( 'Name of discount column', 'tier-pricing-table' ),
@@ -248,26 +219,8 @@
248 219 'desc_tip' => true,
249 220 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
250 221 ],
251 222 [
252 - 'title' => __( 'Set tiered price on click', 'tier-pricing-table' ),
253 - 'id' => self::SETTINGS_PREFIX . 'clickable_table_rows',
254 - 'type' => 'checkbox',
255 - 'default' => 'no',
256 - 'desc' => __( 'Change product quantity on click at table pricing row',
257 - 'tier-pricing-table' ),
258 - 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
259 - ],
260 - [
261 - 'title' => __( 'Show total price', 'tier-pricing-table' ),
262 - 'id' => self::SETTINGS_PREFIX . 'show_total_price',
263 - 'type' => 'checkbox',
264 - 'default' => 'no',
265 - 'desc' => __( 'Calculate and show total price at product page',
266 - 'tier-pricing-table' ),
267 - 'custom_attributes' => [ 'data-tiered-pricing-premium-setting' => true ]
268 - ],
269 - [
270 223 'type' => 'sectionend',
271 224 'id' => self::SETTINGS_PREFIX . 'premium_options'
272 225 ],
273 226 );
@@ -314,33 +267,27 @@
314 267 * @return array
315 268 */
316 269 public function getAll() {
317 270 return [
318 - 'display' => $this->get( 'display', 'yes' ),
319 - 'position_hook' => $this->get( 'position_hook',
320 - 'woocommerce_after_add_to_cart_button' ),
321 - 'head_quantity_text' => $this->get( 'head_quantity_text',
271 + 'display' => $this->get( 'display', 'yes' ),
272 + 'position_hook' => $this->get( 'position_hook', 'woocommerce_after_add_to_cart_button' ),
273 + 'head_quantity_text' => $this->get( 'head_quantity_text',
322 274 __( 'Quantity', 'tier-pricing-table' ) ),
323 - 'head_price_text' => $this->get( 'head_price_text',
324 - __( 'Price', 'tier-pricing-table' ) ),
325 - 'display_type' => $this->get( 'display_type', 'table' ),
326 - 'selected_quantity_color' => $this->get( 'selected_quantity_color', '#cc99c2' ),
327 - 'table_title' => $this->get( 'table_title', '' ),
328 - 'table_css_class' => $this->get( 'table_css_class', '#fff' ),
329 - 'tooltip_size' => $this->get( 'tooltip_size', 15 ),
330 - 'tooltip_border' => $this->get( 'tooltip_border', 'yes' ),
275 + 'head_price_text' => $this->get( 'head_price_text', __( 'Price', 'tier-pricing-table' ) ),
276 + 'display_type' => $this->get( 'display_type', 'table' ),
277 + 'selected_quantity_color' => $this->get( 'selected_quantity_color', '#cc99c2' ),
278 + 'table_title' => $this->get( 'table_title', '' ),
279 + 'table_css_class' => $this->get( 'table_css_class', '#fff' ),
280 + 'tooltip_size' => $this->get( 'tooltip_size', 15 ),
281 + 'tooltip_border' => $this->get( 'tooltip_border', 'yes' ),
331 282
332 283 /* Premium */
333 - 'show_discount_in_cart' => $this->get( 'show_discount_in_cart', 'yes' ),
334 - 'tiered_price_at_catalog' => $this->get( 'tiered_price_at_catalog', 'yes' ),
335 - 'tiered_price_at_product_page' => $this->get( 'tiered_price_at_product_page', 'no' ),
336 - 'tiered_price_at_catalog_for_variable' => $this->get( 'tiered_price_at_catalog_for_variable', 'yes' ),
337 - 'tiered_price_at_catalog_type' => $this->get( 'tiered_price_at_catalog_type', 'yes' ),
338 - 'lowest_prefix' => $this->get( 'lowest_prefix', 'yes' ),
339 - 'show_discount_column' => $this->get( 'show_discount_column', 'yes' ),
340 - 'clickable_table_rows' => $this->get( 'clickable_table_rows', 'no' ),
341 - 'show_total_price' => $this->get( 'show_total_price', 'no' ),
342 - 'head_discount_text' => $this->get( 'head_discount_text',
284 + 'show_discount_in_cart' => $this->get( 'show_discount_in_cart', 'yes' ),
285 + 'tiered_price_at_catalog' => $this->get( 'tiered_price_at_catalog', 'yes' ),
286 + 'tiered_price_at_catalog_type' => $this->get( 'tiered_price_at_catalog_type', 'yes' ),
287 + 'lowest_prefix' => $this->get( 'lowest_prefix', 'yes' ),
288 + 'show_discount_column' => $this->get( 'show_discount_column', 'yes' ),
289 + 'head_discount_text' => $this->get( 'head_discount_text',
343 290 __( 'Discount (%)', 'tier-pricing-table' ) ),
344 291 ];
345 292 }
346 293