Booster for WooCommerce - Version 3.6.1

Version Description

  • 04/06/2018 =
  • Fix - Functions - Products - wcj_maybe_get_product_id_wpml() - "Call to a member function get_default_language() on null ..." fatal error fixed.
Download this release

Release Info

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

Code changes from version 3.6.0 to 3.6.1

includes/functions/wcj-functions-products.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Booster for WooCommerce - Functions - Products
4
  *
5
- * @version 3.6.0
6
  * @since 2.9.0
7
  * @author Algoritmika Ltd.
8
  */
@@ -13,13 +13,20 @@ if ( ! function_exists( 'wcj_maybe_get_product_id_wpml' ) ) {
13
  /**
14
  * wcj_maybe_get_product_id_wpml.
15
  *
16
- * @version 3.6.0
17
  * @since 3.6.0
18
  */
19
  function wcj_maybe_get_product_id_wpml( $product_id ) {
20
  if ( function_exists( 'icl_object_id' ) ) {
21
  global $sitepress;
22
- $product_id = icl_object_id( $product_id, 'product', true, $sitepress->get_default_language() );
 
 
 
 
 
 
 
23
  }
24
  return $product_id;
25
  }
2
  /**
3
  * Booster for WooCommerce - Functions - Products
4
  *
5
+ * @version 3.6.1
6
  * @since 2.9.0
7
  * @author Algoritmika Ltd.
8
  */
13
  /**
14
  * wcj_maybe_get_product_id_wpml.
15
  *
16
+ * @version 3.6.1
17
  * @since 3.6.0
18
  */
19
  function wcj_maybe_get_product_id_wpml( $product_id ) {
20
  if ( function_exists( 'icl_object_id' ) ) {
21
  global $sitepress;
22
+ if ( $sitepress ) {
23
+ $default_language = $sitepress->get_default_language();
24
+ } elseif ( function_exists( 'icl_get_setting' ) ) {
25
+ $default_language = icl_get_setting( 'default_language' );
26
+ } else {
27
+ $default_language = null;
28
+ }
29
+ $product_id = icl_object_id( $product_id, 'product', true, $default_language );
30
  }
31
  return $product_id;
32
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: algoritmika, anbinder
3
  Tags: woocommerce, booster for woocommerce, woocommerce jetpack
4
  Requires at least: 4.4
5
  Tested up to: 4.9
6
- Stable tag: 3.6.0
7
  License: GNU General Public License v3.0
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -187,6 +187,9 @@ You can see the differences between versions in this [table](https://booster.io/
187
 
188
  == Changelog ==
189
 
 
 
 
190
  = 3.6.0 - 03/06/2018 =
191
  * Dev - PRICES & CURRENCIES - Currency Exchange Rates - Admin settings - Description updated.
192
  * Dev - PRICES & CURRENCIES - Currency Exchange Rates - `wcj_currency_exchange_rates_servers` and `wcj_currency_exchange_rate` filters added.
3
  Tags: woocommerce, booster for woocommerce, woocommerce jetpack
4
  Requires at least: 4.4
5
  Tested up to: 4.9
6
+ Stable tag: 3.6.1
7
  License: GNU General Public License v3.0
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
187
 
188
  == Changelog ==
189
 
190
+ = 3.6.1 - 04/06/2018 =
191
+ * Fix - Functions - Products - `wcj_maybe_get_product_id_wpml()` - "Call to a member function get_default_language() on null ..." fatal error fixed.
192
+
193
  = 3.6.0 - 03/06/2018 =
194
  * Dev - PRICES & CURRENCIES - Currency Exchange Rates - Admin settings - Description updated.
195
  * Dev - PRICES & CURRENCIES - Currency Exchange Rates - `wcj_currency_exchange_rates_servers` and `wcj_currency_exchange_rate` filters added.
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.
6
- Version: 3.6.0
7
  Author: Algoritmika Ltd
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 = '3.6.0';
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.
6
+ Version: 3.6.1
7
  Author: Algoritmika Ltd
8
  Author URI: https://booster.io
9
  Text Domain: woocommerce-jetpack
57
  * @var string
58
  * @since 2.4.7
59
  */
60
+ public $version = '3.6.1';
61
 
62
  /**
63
  * @var WC_Jetpack The single instance of the class