Booster for WooCommerce - Version 1.7.7

Version Description

Bug causing setting checkboxes back to on, fixed. Upgrade immediately.

Download this release

Release Info

Developer algoritmika
Plugin Icon 128x128 Booster for WooCommerce
Version 1.7.7
Comparing to
See all releases

Code changes from version 1.7.6 to 1.7.7

includes/class-wcj-price-labels.php CHANGED
@@ -5,7 +5,7 @@
5
  * The WooCommerce Jetpack Price Labels class.
6
  *
7
  * @class WCJ_Price_Labels
8
- * @version 1.5.0
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
@@ -55,13 +55,12 @@ class WCJ_Price_Labels {
55
  add_filter( 'wcj_tools_tabs', array( $this, 'add_migrate_from_custom_price_labels_tool_tab' ), 100 );
56
  add_action( 'wcj_tools_migrate_from_custom_price_labels', array( $this, 'create_migrate_from_custom_price_labels_tool_tab' ), 100 );
57
  }
58
- }
59
-
60
-
61
  // Add meta box
62
  add_action( 'add_meta_boxes', array( $this, 'add_price_label_meta_box' ) );
63
  // Save Post
64
- add_action( 'save_post', array( $this, 'save_custom_price_labels' ), 999, 2 );
65
 
66
  // Prices Hooks
67
  $this->prices_filters = array(
@@ -188,22 +187,37 @@ class WCJ_Price_Labels {
188
  // Found Old (Custom Price Labels Plugin) meta to migrate to
189
  if ( true === $migrate ) {
190
  // Migrating
191
- $html .= '<li>' . __( 'Migrating: ', 'woocommerce-jetpack' ) . $old_meta_name . '[' . $old_meta_value . ']' . ' -> ' . $new_meta_name . '[' . $new_meta_value . ']. ';// . '</li>';
192
  $html .= __( 'Result: ', 'woocommerce-jetpack' ) . update_post_meta( $the_product_id, $new_meta_name, $old_meta_value );
193
  $html .= '</li>';
194
 
195
  //wp_update_post( array( 'ID' => $the_product_id ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  }
197
  else {
198
  // Info only
199
- $html .= '<li>' . __( 'Found data to migrate: ', 'woocommerce-jetpack' ) . $old_meta_name . '[' . $old_meta_value . ']' . ' -> ' . $new_meta_name . '[' . $new_meta_value . ']' . '</li>';
200
  }
201
  /*if ( true === $do_delete_old ) {
202
  // Delete Old (Custom Price Labels Plugin) meta
203
  $html .= '<li>' . __( 'Deleting: ', 'woocommerce-jetpack' ) . $old_meta_name . '[' . $old_meta_value . ']. ';// . '</li>';
204
  $html .= __( ' Result: ', 'woocommerce-jetpack' ) . delete_post_meta( $the_product_id, $old_meta_name, $old_meta_value );
205
  $html .= '</li>';
206
- }*/
207
  }
208
  //wp_update_post( array( 'ID' => $the_product_id ) );
209
  }
@@ -246,6 +260,9 @@ class WCJ_Price_Labels {
246
 
247
  //$product = get_product( $post );TODO - do I need it?
248
 
 
 
 
249
  foreach ( $this->custom_tab_sections as $custom_tab_section ) {
250
 
251
  foreach ( $this->custom_tab_section_variations as $custom_tab_section_variation ) {
@@ -253,9 +270,9 @@ class WCJ_Price_Labels {
253
  //$option_name = $this->custom_tab_group_name;
254
  $option_name = $this->custom_tab_group_name . $custom_tab_section . $custom_tab_section_variation;
255
 
256
- if ( isset( $_POST[ $option_name ] ) ) update_post_meta( $post_id, '_' . $option_name, $_POST[ $option_name ] );
257
 
258
- /*
259
  if ( $custom_tab_section_variation == '_text' ) {
260
  //$option_name .= $custom_tab_section_variation . $custom_tab_section;
261
  if ( isset( $_POST[ $option_name ] ) ) update_post_meta( $post_id, '_' . $option_name, $_POST[ $option_name ] );
@@ -265,7 +282,7 @@ class WCJ_Price_Labels {
265
  if ( isset( $_POST[ $option_name ] ) ) update_post_meta( $post_id, '_' . $option_name, $_POST[ $option_name ] );
266
  else update_post_meta( $post_id, '_' . $option_name, 'off' );
267
  }
268
- */
269
  }
270
  }
271
  }
@@ -281,15 +298,16 @@ class WCJ_Price_Labels {
281
  public function wcj_price_label() {
282
 
283
  $current_post_id = get_the_ID();
284
- echo '<table style="width:100%;">';
285
 
286
-
287
  echo '<tr>';
288
  foreach ( $this->custom_tab_sections as $custom_tab_section ) {
289
  echo '<td style="width:25%;"><h4>' . $this->custom_tab_sections_titles[ $custom_tab_section ] . '</h4></td>';
290
  }
291
  echo '</tr>';
292
- /*echo '<tr>';
 
 
293
  foreach ( $this->custom_tab_sections as $custom_tab_section ) {
294
  if ( '_instead' != $custom_tab_section )
295
  $disabled_if_no_plus = apply_filters( 'get_wc_jetpack_plus_message', '', 'desc_below' );
@@ -297,8 +315,8 @@ class WCJ_Price_Labels {
297
  $disabled_if_no_plus = '';
298
  echo '<td style="width:25%;">' . $disabled_if_no_plus . '</td>';
299
  }
300
- echo '</tr>'; */
301
-
302
 
303
  echo '<tr>';
304
  foreach ( $this->custom_tab_sections as $custom_tab_section ) {
@@ -355,9 +373,7 @@ class WCJ_Price_Labels {
355
  echo '</td>';
356
 
357
  }
358
-
359
- echo '</tr>';
360
-
361
  echo '<tr>';
362
  foreach ( $this->custom_tab_sections as $custom_tab_section ) {
363
  if ( '_instead' != $custom_tab_section )
@@ -367,8 +383,8 @@ class WCJ_Price_Labels {
367
  echo '<td style="width:25%;">' . $disabled_if_no_plus . '</td>';
368
  }
369
  echo '</tr>';
370
-
371
  echo '</table>';
 
372
  }
373
 
374
  /*
5
  * The WooCommerce Jetpack Price Labels class.
6
  *
7
  * @class WCJ_Price_Labels
8
+ * @version 1.7.0
9
  * @category Class
10
  * @author Algoritmika Ltd.
11
  */
55
  add_filter( 'wcj_tools_tabs', array( $this, 'add_migrate_from_custom_price_labels_tool_tab' ), 100 );
56
  add_action( 'wcj_tools_migrate_from_custom_price_labels', array( $this, 'create_migrate_from_custom_price_labels_tool_tab' ), 100 );
57
  }
58
+ }
59
+
 
60
  // Add meta box
61
  add_action( 'add_meta_boxes', array( $this, 'add_price_label_meta_box' ) );
62
  // Save Post
63
+ add_action( 'save_post_product', array( $this, 'save_custom_price_labels' ), 999, 2 );
64
 
65
  // Prices Hooks
66
  $this->prices_filters = array(
187
  // Found Old (Custom Price Labels Plugin) meta to migrate to
188
  if ( true === $migrate ) {
189
  // Migrating
190
+ $html .= '<li>' . __( 'Migrating (product ID ', 'woocommerce-jetpack' ) . $the_product_id . '): ' . $old_meta_name . '[' . $old_meta_value . ']' . ' -> ' . $new_meta_name . '[' . $new_meta_value . ']. ';// . '</li>';
191
  $html .= __( 'Result: ', 'woocommerce-jetpack' ) . update_post_meta( $the_product_id, $new_meta_name, $old_meta_value );
192
  $html .= '</li>';
193
 
194
  //wp_update_post( array( 'ID' => $the_product_id ) );
195
+
196
+ // Fill all data with defaults
197
+ foreach ( $this->custom_tab_sections as $custom_tab_section ) {
198
+ foreach ( $this->custom_tab_section_variations as $custom_tab_section_variation ) {
199
+ $option_name = $this->custom_tab_group_name . $custom_tab_section . $custom_tab_section_variation;
200
+ if ( '' == get_post_meta( $the_product_id, '_' . $option_name, true ) ) {
201
+ if ( '_text' === $custom_tab_section_variation )
202
+ update_post_meta( $the_product_id, '_' . $option_name, '' );
203
+ else
204
+ update_post_meta( $the_product_id, '_' . $option_name, 'off' );
205
+
206
+ //$html .= '<li>' . __( 'Setting defaults for: ', 'woocommerce-jetpack' ) . '_' . $option_name . '</li>';
207
+ }
208
+ }
209
+ }
210
  }
211
  else {
212
  // Info only
213
+ $html .= '<li>' . __( 'Found data to migrate (product ID ', 'woocommerce-jetpack' ) . $the_product_id . '): ' . $old_meta_name . '[' . $old_meta_value . ']' . ' -> ' . $new_meta_name . '[' . $new_meta_value . ']' . '</li>';
214
  }
215
  /*if ( true === $do_delete_old ) {
216
  // Delete Old (Custom Price Labels Plugin) meta
217
  $html .= '<li>' . __( 'Deleting: ', 'woocommerce-jetpack' ) . $old_meta_name . '[' . $old_meta_value . ']. ';// . '</li>';
218
  $html .= __( ' Result: ', 'woocommerce-jetpack' ) . delete_post_meta( $the_product_id, $old_meta_name, $old_meta_value );
219
  $html .= '</li>';
220
+ }*/
221
  }
222
  //wp_update_post( array( 'ID' => $the_product_id ) );
223
  }
260
 
261
  //$product = get_product( $post );TODO - do I need it?
262
 
263
+ if ( ! isset( $_POST['woojetpack_price_labels_save_post'] ) )
264
+ return;
265
+
266
  foreach ( $this->custom_tab_sections as $custom_tab_section ) {
267
 
268
  foreach ( $this->custom_tab_section_variations as $custom_tab_section_variation ) {
270
  //$option_name = $this->custom_tab_group_name;
271
  $option_name = $this->custom_tab_group_name . $custom_tab_section . $custom_tab_section_variation;
272
 
273
+ // if ( isset( $_POST[ $option_name ] ) ) update_post_meta( $post_id, '_' . $option_name, $_POST[ $option_name ] );
274
 
275
+ /**/
276
  if ( $custom_tab_section_variation == '_text' ) {
277
  //$option_name .= $custom_tab_section_variation . $custom_tab_section;
278
  if ( isset( $_POST[ $option_name ] ) ) update_post_meta( $post_id, '_' . $option_name, $_POST[ $option_name ] );
282
  if ( isset( $_POST[ $option_name ] ) ) update_post_meta( $post_id, '_' . $option_name, $_POST[ $option_name ] );
283
  else update_post_meta( $post_id, '_' . $option_name, 'off' );
284
  }
285
+ /**/
286
  }
287
  }
288
  }
298
  public function wcj_price_label() {
299
 
300
  $current_post_id = get_the_ID();
301
+ echo '<table style="width:100%;">';
302
 
 
303
  echo '<tr>';
304
  foreach ( $this->custom_tab_sections as $custom_tab_section ) {
305
  echo '<td style="width:25%;"><h4>' . $this->custom_tab_sections_titles[ $custom_tab_section ] . '</h4></td>';
306
  }
307
  echo '</tr>';
308
+
309
+ /*
310
+ echo '<tr>';
311
  foreach ( $this->custom_tab_sections as $custom_tab_section ) {
312
  if ( '_instead' != $custom_tab_section )
313
  $disabled_if_no_plus = apply_filters( 'get_wc_jetpack_plus_message', '', 'desc_below' );
315
  $disabled_if_no_plus = '';
316
  echo '<td style="width:25%;">' . $disabled_if_no_plus . '</td>';
317
  }
318
+ echo '</tr>';
319
+ */
320
 
321
  echo '<tr>';
322
  foreach ( $this->custom_tab_sections as $custom_tab_section ) {
373
  echo '</td>';
374
 
375
  }
376
+ echo '</tr>';
 
 
377
  echo '<tr>';
378
  foreach ( $this->custom_tab_sections as $custom_tab_section ) {
379
  if ( '_instead' != $custom_tab_section )
383
  echo '<td style="width:25%;">' . $disabled_if_no_plus . '</td>';
384
  }
385
  echo '</tr>';
 
386
  echo '</table>';
387
+ echo '<input type="hidden" name="woojetpack_price_labels_save_post" value="woojetpack_price_labels_save_post">';
388
  }
389
 
390
  /*
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://algoritmika.com/donate/
4
  Tags: woocommerce,woocommerce jetpack,custom price labels,call for price,currency symbol,remove sorting,remove old product slugs,add to cart text,order number,sequential order numbering,email pdf invoice,pdf invoice,pdf invoices,already in cart,empty cart,redirect to checkout,minimum order amount,customize checkout fields,checkout fields,email,customize product tabs,product tabs,related products number,empty cart,redirect add to cart,redirect to checkout,product already in cart,custom payment gateway,payment gateway icon,auto-complete all orders,custom order statuses,custom order status,remove text from price,custom css,hide categories count,hide subcategories count,hide category count,hide subcategory count,display total sales
5
  Requires at least: 3.9.1
6
  Tested up to: 4.0
7
- Stable tag: 1.7.6
8
  License: GNU General Public License v3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -68,15 +68,15 @@ Please let us know if you want anything added to list by <a href="http://woojetp
68
 
69
  If you wish that some task would go up the queue to make it faster, please contact us by <a href="http://woojetpack.com/contact-us/">filling this form</a>. We are listening carefully to our users!
70
 
71
- = 1.7.7 - 10/10/2014 =
 
72
  * New Feature - Smart Reports - Various reports based on products prices, sales, stock.
73
  * Upgrade Feature - PDF Invoices - International date formats. Idea by Jean-Marc.
74
  * Upgrade Feature - Shipping - Advance free shipping - Free shipping for multiple country/places. Each country/places different prices. Idea by LQTOYS.
75
  * Upgrade Feature - PDF Invoices - Make emailing PDF as attachment option available for certain payment methods only (user selection). Idea by Jen.
76
  * Upgrade Feature - PDF Invoices - Sending invoice on customer's request. Idea by Jen.
77
- * Checkout - Extra fee (e.g. for PayPal). Suggested by Daniele.
78
-
79
- = 1.8.0 - 13/10/2014 =
80
  * New Feature - Checkout to PDF (wish list). Idea by Mick 01/10/2014.
81
  * New Feature - Add second currency to the price.
82
  * New Feature - Products per Page - Add "products per page" option for customers (i.e. front end).
@@ -91,14 +91,14 @@ If you wish that some task would go up the queue to make it faster, please conta
91
  * Upgrade Feature - Smart Reports - Export to CSV file.
92
  * Upgrade Feature - Call for Price - Call for price for variable products (all variations or only some).
93
  * Upgrade Feature - Custom Statuses - Bulk change status.
 
94
 
95
- = 1.9.0 - 20/10/2014 =
96
  * Upgrade Feature - Custom Price Labels - ?Add "local remove".
97
  * Upgrade Feature - Orders - Bulk orders i.e. "Buy More - Pay Less". Start from global discount for all products, i.e. cart discount; later - discounts for individual products.
98
  * Upgrade Feature - Custom Price Labels - Add different labels for archives, single, homepage, related. Add option to select which price hooks to use. Different labels for variable and variation.
99
  * Upgrade Feature - Custom Price Labels - Custom free price.
100
  * Upgrade Feature - Checkout - Custom checkout fields.
101
- * Upgrade Feature - Product Info - Custom product tabs.
102
  * Upgrade Feature - Checkout - Skrill.
103
  * Upgrade Feature - Checkout - Amazon Payments.
104
  * Upgrade Feature - Orders - Maximum weight - "Contact us" to place order with products total weight over some amount.
@@ -109,21 +109,38 @@ If you wish that some task would go up the queue to make it faster, please conta
109
  Programs like SellerActive and BigCommerce come close, but don't do everything.
110
  Idea by Dave.
111
 
112
- = 2.0.0 - 27/10/2014 =
113
  * Dev - Move all to `WooCommerce > Jetpack` menu.
114
  * Dev - Major source code, documentation, locking mechanism etc. recheck.
115
  Maybe rename "Features" to "Modules".
116
  * Dev - Add "Restore Defaults" option (will also need to delete/reset some meta data (e.g. price labels) for all posts).
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  == Changelog ==
119
 
 
 
 
 
120
  = 1.7.6 - 09/10/2014 =
121
  * Fix - Custom Price Labels - Bug causing setting all product's checkbox labels to off, fixed.
122
  Bug was not resetting Text labels however (i.e. checkboxes only). Bug was in code since v.1.0.0.
123
  The bug caused resetting all product's checkbox labels to off, when generally any product save, except "normal" conditions (i.e. saving through standard edit), happened:
124
  - when any other plugin used `wp_update_post` function,
125
  - when user updated product via Quick Edit,
126
- - when user deactivated WooJetpack Plugin and then updated (saved) the product.
127
  - could be more possible conditions.
128
  * Fix - Custom Price Labels - "Migrate from Custom Price Labels" tool info added to tools dashboard.
129
  * Dev - Custom Price Labels - Labels settings in product edit rearranged (to `table`).
@@ -295,6 +312,9 @@ If you wish that some task would go up the queue to make it faster, please conta
295
 
296
  == Upgrade Notice ==
297
 
 
 
 
298
  = 1.7.6 =
299
  Bug causing setting all product's checkbox labels to off, fixed. Upgrade immediately.
300
 
4
  Tags: woocommerce,woocommerce jetpack,custom price labels,call for price,currency symbol,remove sorting,remove old product slugs,add to cart text,order number,sequential order numbering,email pdf invoice,pdf invoice,pdf invoices,already in cart,empty cart,redirect to checkout,minimum order amount,customize checkout fields,checkout fields,email,customize product tabs,product tabs,related products number,empty cart,redirect add to cart,redirect to checkout,product already in cart,custom payment gateway,payment gateway icon,auto-complete all orders,custom order statuses,custom order status,remove text from price,custom css,hide categories count,hide subcategories count,hide category count,hide subcategory count,display total sales
5
  Requires at least: 3.9.1
6
  Tested up to: 4.0
7
+ Stable tag: 1.7.7
8
  License: GNU General Public License v3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
68
 
69
  If you wish that some task would go up the queue to make it faster, please contact us by <a href="http://woojetpack.com/contact-us/">filling this form</a>. We are listening carefully to our users!
70
 
71
+ = 1.8.0 - XX/10/2014 =
72
+ * Upgrade Feature - Custom Price Labels - Hide on cart/checkout only. Idea by Paolo.
73
  * New Feature - Smart Reports - Various reports based on products prices, sales, stock.
74
  * Upgrade Feature - PDF Invoices - International date formats. Idea by Jean-Marc.
75
  * Upgrade Feature - Shipping - Advance free shipping - Free shipping for multiple country/places. Each country/places different prices. Idea by LQTOYS.
76
  * Upgrade Feature - PDF Invoices - Make emailing PDF as attachment option available for certain payment methods only (user selection). Idea by Jen.
77
  * Upgrade Feature - PDF Invoices - Sending invoice on customer's request. Idea by Jen.
78
+ * Upgrade Feature - Checkout - Extra fee (e.g. for PayPal). Suggested by Daniele.
79
+ * Upgrade Feature - Product Info - Custom product tabs.
 
80
  * New Feature - Checkout to PDF (wish list). Idea by Mick 01/10/2014.
81
  * New Feature - Add second currency to the price.
82
  * New Feature - Products per Page - Add "products per page" option for customers (i.e. front end).
91
  * Upgrade Feature - Smart Reports - Export to CSV file.
92
  * Upgrade Feature - Call for Price - Call for price for variable products (all variations or only some).
93
  * Upgrade Feature - Custom Statuses - Bulk change status.
94
+ * Product Add-ons. Idea by Mangesh.
95
 
96
+ = 1.9.0 - 30/10/2014 =
97
  * Upgrade Feature - Custom Price Labels - ?Add "local remove".
98
  * Upgrade Feature - Orders - Bulk orders i.e. "Buy More - Pay Less". Start from global discount for all products, i.e. cart discount; later - discounts for individual products.
99
  * Upgrade Feature - Custom Price Labels - Add different labels for archives, single, homepage, related. Add option to select which price hooks to use. Different labels for variable and variation.
100
  * Upgrade Feature - Custom Price Labels - Custom free price.
101
  * Upgrade Feature - Checkout - Custom checkout fields.
 
102
  * Upgrade Feature - Checkout - Skrill.
103
  * Upgrade Feature - Checkout - Amazon Payments.
104
  * Upgrade Feature - Orders - Maximum weight - "Contact us" to place order with products total weight over some amount.
109
  Programs like SellerActive and BigCommerce come close, but don't do everything.
110
  Idea by Dave.
111
 
112
+ = 2.0.0 - 15/11/2014 =
113
  * Dev - Move all to `WooCommerce > Jetpack` menu.
114
  * Dev - Major source code, documentation, locking mechanism etc. recheck.
115
  Maybe rename "Features" to "Modules".
116
  * Dev - Add "Restore Defaults" option (will also need to delete/reset some meta data (e.g. price labels) for all posts).
117
 
118
+ = More Ideas =
119
+ * Different prices for different countries (WPML?). Suggested by Daniele.
120
+ * Product Info on Archive Pages option within Woo Jetpack to list the different colour variations of a product on the category sections. Idea by Tony.
121
+ * Ideas by Jean-Marc:
122
+ - PDF invoice: Sequential invoice numbers: different than the order number. could use woocomerce santard order number and special invoice number,
123
+ - Choose starting point for invoice numbers,
124
+ - Proforma invoicing (change title to proforma invoice),
125
+ - Add additional company information with html tags like `<strong>`...,
126
+ - Add refunds policies, conditions...,
127
+ - Customizable invoice template.
128
+ - More: Packing Slip Option (without prices because Packing Slip is not Invoice),
129
+ - Customizable Packing Slip template.
130
+ - Orders: Customer VAT Number field (very useful in Europa).
131
+
132
  == Changelog ==
133
 
134
+ = 1.7.7 - 13/10/2014 =
135
+ * Fix - Custom Price Labels - Bug causing setting checkboxes back to *on*, fixed. Suggested by Erika.
136
+ * Fix - Custom Price Labels - "Migrate from Custom Price Labels (Pro)" tool - new since Custom Price Labels plugin data was missing, fixed. Suggested by Paolo.
137
+
138
  = 1.7.6 - 09/10/2014 =
139
  * Fix - Custom Price Labels - Bug causing setting all product's checkbox labels to off, fixed.
140
  Bug was not resetting Text labels however (i.e. checkboxes only). Bug was in code since v.1.0.0.
141
  The bug caused resetting all product's checkbox labels to off, when generally any product save, except "normal" conditions (i.e. saving through standard edit), happened:
142
  - when any other plugin used `wp_update_post` function,
143
  - when user updated product via Quick Edit,
 
144
  - could be more possible conditions.
145
  * Fix - Custom Price Labels - "Migrate from Custom Price Labels" tool info added to tools dashboard.
146
  * Dev - Custom Price Labels - Labels settings in product edit rearranged (to `table`).
312
 
313
  == Upgrade Notice ==
314
 
315
+ = 1.7.7 =
316
+ Bug causing setting checkboxes back to *on*, fixed. Upgrade immediately.
317
+
318
  = 1.7.6 =
319
  Bug causing setting all product's checkbox labels to off, fixed. Upgrade immediately.
320
 
woocommerce-jetpack.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WooCommerce Jetpack
4
  Plugin URI: http://woojetpack.com
5
  Description: Supercharge your WooCommerce site with these awesome powerful features.
6
- Version: 1.7.6
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2014 Algoritmika Ltd.
3
  Plugin Name: WooCommerce Jetpack
4
  Plugin URI: http://woojetpack.com
5
  Description: Supercharge your WooCommerce site with these awesome powerful features.
6
+ Version: 1.7.7
7
  Author: Algoritmika Ltd
8
  Author URI: http://www.algoritmika.com
9
  Copyright: © 2014 Algoritmika Ltd.