Booster for WooCommerce - Version 5.3.5

Version Description

  • 09/10/2020 =
  • Fix - PRODUCTS - Product by Condition - Fix shipping removing algorithm.
  • Fix - Improper replacement of get_option() by wcj_option().
Download this release

Release Info

Developer pluggabl
Plugin Icon 128x128 Booster for WooCommerce
Version 5.3.5
Comparing to
See all releases

Code changes from version 5.3.4 to 5.3.5

includes/classes/class-wcj-module-shipping-by-condition.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Module - Shipping by Condition
4
  *
5
- * @version 5.3.0
6
  * @since 3.2.0
7
  * @author Pluggabl LLC.
8
  */
@@ -42,7 +42,7 @@ abstract class WCJ_Module_Shipping_By_Condition extends WCJ_Module {
42
  /**
43
  * available_shipping_methods.
44
  *
45
- * @version 5.3.0
46
  * @since 3.2.0
47
  * @todo apply_filters( 'booster_option' )
48
  */
@@ -58,8 +58,12 @@ abstract class WCJ_Module_Shipping_By_Condition extends WCJ_Module {
58
  get_option( 'wcj_shipping_' . $options_id . '_include_' . 'instance_' . $rate->instance_id, '' ) :
59
  get_option( 'wcj_shipping_' . $options_id . '_include_' . $rate->method_id, '' )
60
  );
61
- if ( ! empty( $include ) && $this->check( $options_id, $include, 'include', $package ) ) {
62
- $include_arr[] = $rate_key;
 
 
 
 
63
  }
64
  $exclude = ( $this->use_shipping_instances ?
65
  get_option( 'wcj_shipping_' . $options_id . '_exclude_' . 'instance_' . $rate->instance_id, '' ) :
@@ -72,7 +76,7 @@ abstract class WCJ_Module_Shipping_By_Condition extends WCJ_Module {
72
  }
73
  foreach ( $rates as $rate_key => $rate ) {
74
  if (
75
- ( ! empty( $include_arr ) && ! in_array( $rate_key, $include_arr ) ) ||
76
  ( ! empty( $exclude_arr ) && in_array( $rate_key, $exclude_arr ) )
77
  ) {
78
  unset( $rates[ $rate_key ] );
2
  /**
3
  * Booster for WooCommerce - Module - Shipping by Condition
4
  *
5
+ * @version 5.3.5
6
  * @since 3.2.0
7
  * @author Pluggabl LLC.
8
  */
42
  /**
43
  * available_shipping_methods.
44
  *
45
+ * @version 5.3.5
46
  * @since 3.2.0
47
  * @todo apply_filters( 'booster_option' )
48
  */
58
  get_option( 'wcj_shipping_' . $options_id . '_include_' . 'instance_' . $rate->instance_id, '' ) :
59
  get_option( 'wcj_shipping_' . $options_id . '_include_' . $rate->method_id, '' )
60
  );
61
+ if ( ! empty( $include ) ) {
62
+ if ( $this->check( $options_id, $include, 'include', $package ) ) {
63
+ //$include_arr[] = $rate_key;
64
+ } else {
65
+ unset( $rates[ $rate_key ] );
66
+ }
67
  }
68
  $exclude = ( $this->use_shipping_instances ?
69
  get_option( 'wcj_shipping_' . $options_id . '_exclude_' . 'instance_' . $rate->instance_id, '' ) :
76
  }
77
  foreach ( $rates as $rate_key => $rate ) {
78
  if (
79
+ //( ! empty( $include_arr ) && ! in_array( $rate_key, $include_arr ) ) ||
80
  ( ! empty( $exclude_arr ) && in_array( $rate_key, $exclude_arr ) )
81
  ) {
82
  unset( $rates[ $rate_key ] );
includes/shipping/class-wc-shipping-wcj-custom-with-shipping-zones.php CHANGED
@@ -269,7 +269,7 @@ if ( ! class_exists( 'WC_Shipping_WCJ_Custom_W_Zones' ) ) :
269
  /**
270
  * calculate_shipping_by_table.
271
  *
272
- * @version 2.8.0
273
  * @since 2.5.6
274
  */
275
  function calculate_shipping_by_table( $weight ) {
@@ -280,11 +280,11 @@ if ( ! class_exists( 'WC_Shipping_WCJ_Custom_W_Zones' ) ) :
280
  for ( $i = 1; $i <= $this->weight_table_total_rows; $i++ ) {
281
  $option_name_weight = 'weight_table_weight_row_' . $i;
282
  $option_name_cost = 'weight_table_cost_row_' . $i;
283
- if ( $weight <= wcj_get_option( $option_name_weight ) ) {
284
- return wcj_get_option( $option_name_cost );
285
  }
286
  }
287
- return wcj_get_option( $option_name_cost ); // fallback - last row
288
  }
289
 
290
  /**
269
  /**
270
  * calculate_shipping_by_table.
271
  *
272
+ * @version 5.3.5
273
  * @since 2.5.6
274
  */
275
  function calculate_shipping_by_table( $weight ) {
280
  for ( $i = 1; $i <= $this->weight_table_total_rows; $i++ ) {
281
  $option_name_weight = 'weight_table_weight_row_' . $i;
282
  $option_name_cost = 'weight_table_cost_row_' . $i;
283
+ if ( $weight <= $this->get_option( $option_name_weight ) ) {
284
+ return $this->get_option( $option_name_cost );
285
  }
286
  }
287
+ return $this->get_option( $option_name_cost ); // fallback - last row
288
  }
289
 
290
  /**
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: anbinder, karzin, pluggabl
3
  Tags: woocommerce, booster for woocommerce, woocommerce jetpack
4
  Requires at least: 4.4
5
  Tested up to: 5.5
6
- Stable tag: 5.3.4
7
  License: GNU General Public License v3.0
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -193,6 +193,10 @@ You can see the differences between versions in this [table](https://booster.io/
193
 
194
  == Changelog ==
195
 
 
 
 
 
196
  = 5.3.4 - 06/10/2020 =
197
  * Fix - Improper replacement of `get_option()` by `wcj_option()`.
198
  * Fix - SHIPPING & ORDERS - Custom Shipping - Created custom shipping name as `null`.
3
  Tags: woocommerce, booster for woocommerce, woocommerce jetpack
4
  Requires at least: 4.4
5
  Tested up to: 5.5
6
+ Stable tag: 5.3.5
7
  License: GNU General Public License v3.0
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
193
 
194
  == Changelog ==
195
 
196
+ = 5.3.5 - 09/10/2020 =
197
+ * Fix - PRODUCTS - Product by Condition - Fix shipping removing algorithm.
198
+ * Fix - Improper replacement of `get_option()` by `wcj_option()`.
199
+
200
  = 5.3.4 - 06/10/2020 =
201
  * Fix - Improper replacement of `get_option()` by `wcj_option()`.
202
  * Fix - SHIPPING & ORDERS - Custom Shipping - Created custom shipping name as `null`.
woocommerce-jetpack.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Booster for WooCommerce
4
  Plugin URI: https://booster.io
5
  Description: Supercharge your WooCommerce site with these awesome powerful features. More than 100 modules. All in one WooCommerce plugin.
6
- Version: 5.3.4
7
  Author: Pluggabl LLC
8
  Author URI: https://booster.io
9
  Text Domain: woocommerce-jetpack
@@ -57,7 +57,7 @@ final class WC_Jetpack {
57
  * @var string
58
  * @since 2.4.7
59
  */
60
- public $version = '5.3.4';
61
 
62
  /**
63
  * @var WC_Jetpack The single instance of the class
3
  Plugin Name: Booster for WooCommerce
4
  Plugin URI: https://booster.io
5
  Description: Supercharge your WooCommerce site with these awesome powerful features. More than 100 modules. All in one WooCommerce plugin.
6
+ Version: 5.3.5
7
  Author: Pluggabl LLC
8
  Author URI: https://booster.io
9
  Text Domain: woocommerce-jetpack
57
  * @var string
58
  * @since 2.4.7
59
  */
60
+ public $version = '5.3.5';
61
 
62
  /**
63
  * @var WC_Jetpack The single instance of the class