WooCommerce Multilingual – run WooCommerce with WPML - Version 4.4.2

Version Description

  • Fix error with WPML Translation management < 2.8.0 in combination with updated WPML core to 3.2.0
  • Fix Composite products error on orders page
Download this release

Release Info

Developer sergey.r
Plugin Icon 128x128 WooCommerce Multilingual – run WooCommerce with WPML
Version 4.4.2
Comparing to
See all releases

Code changes from version 4.4.1 to 4.4.2

changelog/4.4.2.md ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ # Fixes
2
+ * [wcml-2667] Fix error with WPML Translation management < 2.8.0 in combination with updated WPML core to 3.2.0
3
+ * [wcml-2666] Fix Composite products error on orders page
classes/class-woocommerce-wpml.php CHANGED
@@ -388,6 +388,6 @@ class woocommerce_wpml {
388
 
389
  public function is_wpml_prior_4_2(){
390
  global $sitepress;
391
- return $sitepress->get_wp_api()->version_compare( $sitepress->get_wp_api()->constant( 'ICL_SITEPRESS_VERSION' ), '4.2.0', '<' );
392
  }
393
  }
388
 
389
  public function is_wpml_prior_4_2(){
390
  global $sitepress;
391
+ return $sitepress->get_wp_api()->version_compare( $sitepress->get_wp_api()->constant( 'ICL_SITEPRESS_VERSION' ), '4.2.0', '<' ) || $sitepress->get_wp_api()->version_compare( $sitepress->get_wp_api()->constant( 'WPML_TM_VERSION' ), '2.8.0', '<' );
392
  }
393
  }
compatibility/class-wcml-composite-products.php CHANGED
@@ -460,7 +460,16 @@ class WCML_Composite_Products extends WCML_Compatibility_Helper{
460
  function load_assets( ){
461
  global $pagenow;
462
 
463
- if( ( $pagenow == 'post.php' && isset( $_GET[ 'post' ] ) && wc_get_product( $_GET[ 'post' ] )->get_type() === 'composite' ) || $pagenow == 'post-new.php' ){
 
 
 
 
 
 
 
 
 
464
  wp_register_script( 'wcml-composite-js', WCML_PLUGIN_URL . '/compatibility/res/js/wcml-composite.js', array( 'jquery' ), WCML_VERSION, true );
465
  wp_enqueue_script( 'wcml-composite-js' );
466
 
460
  function load_assets( ){
461
  global $pagenow;
462
 
463
+ $is_composite_edit_page = false;
464
+
465
+ if( $pagenow == 'post.php' && isset( $_GET[ 'post' ] ) ){
466
+ $wc_product = wc_get_product( $_GET[ 'post' ] );
467
+ if( $wc_product && $wc_product->get_type() === 'composite' ){
468
+ $is_composite_edit_page = true;
469
+ }
470
+ }
471
+
472
+ if( $is_composite_edit_page || $pagenow == 'post-new.php' ){
473
  wp_register_script( 'wcml-composite-js', WCML_PLUGIN_URL . '/compatibility/res/js/wcml-composite.js', array( 'jquery' ), WCML_VERSION, true );
474
  wp_enqueue_script( 'wcml-composite-js' );
475
 
compatibility/class-wcml-product-addons.php CHANGED
@@ -176,7 +176,7 @@ class WCML_Product_Addons {
176
 
177
  foreach ( $addons as $add_id => $addon ) {
178
 
179
- if ( $addon['price'] ) {
180
  if (
181
  $is_custom_prices_on &&
182
  isset( $addon[ 'price_' . $client_currency ] ) &&
176
 
177
  foreach ( $addons as $add_id => $addon ) {
178
 
179
+ if ( isset( $addon['price'] ) && $addon['price'] ) {
180
  if (
181
  $is_custom_prices_on &&
182
  isset( $addon[ 'price_' . $client_currency ] ) &&
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: CMS, woocommerce, commerce, ecommerce, e-commerce, products, WPML, multili
5
  License: GPLv2
6
  Requires at least: 3.9
7
  Tested up to: 5.0.3
8
- Stable tag: 4.4.1
9
 
10
  Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
11
 
@@ -140,6 +140,10 @@ WooCommerce Multilingual is compatible with all major WooCommerce extensions. We
140
 
141
  == Changelog ==
142
 
 
 
 
 
143
  = 4.4.1 =
144
  * Fixed catalog visibility not updating
145
  * Fix fatal error with Composite products
5
  License: GPLv2
6
  Requires at least: 3.9
7
  Tested up to: 5.0.3
8
+ Stable tag: 4.4.2
9
 
10
  Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
11
 
140
 
141
  == Changelog ==
142
 
143
+ = 4.4.2 =
144
+ * Fix error with WPML Translation management < 2.8.0 in combination with updated WPML core to 3.2.0
145
+ * Fix Composite products error on orders page
146
+
147
  = 4.4.1 =
148
  * Fixed catalog visibility not updating
149
  * Fix fatal error with Composite products
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit6c2c5f8ed31c90f85bfe737e7731e4e7::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit312e08c087a223fe3e2271ca0d2b50a9::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInitdb2158ab35e86b1fa84892b29c037928::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInita1b8f4c9d068fef42254b8c0a8c82073::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit6c2c5f8ed31c90f85bfe737e7731e4e7
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit6c2c5f8ed31c90f85bfe737e7731e4e7
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit6c2c5f8ed31c90f85bfe737e7731e4e7', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit6c2c5f8ed31c90f85bfe737e7731e4e7', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit6c2c5f8ed31c90f85bfe737e7731e4e7
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire6c2c5f8ed31c90f85bfe737e7731e4e7($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire6c2c5f8ed31c90f85bfe737e7731e4e7($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit312e08c087a223fe3e2271ca0d2b50a9
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit312e08c087a223fe3e2271ca0d2b50a9', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit312e08c087a223fe3e2271ca0d2b50a9', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit312e08c087a223fe3e2271ca0d2b50a9::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit312e08c087a223fe3e2271ca0d2b50a9::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire312e08c087a223fe3e2271ca0d2b50a9($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire312e08c087a223fe3e2271ca0d2b50a9($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInitdb2158ab35e86b1fa84892b29c037928 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitdb2158ab35e86b1fa84892b29c037928 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitdb2158ab35e86b1fa84892b29c037928', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitdb2158ab35e86b1fa84892b29c037928', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInita1b8f4c9d068fef42254b8c0a8c82073 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInita1b8f4c9d068fef42254b8c0a8c82073', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInita1b8f4c9d068fef42254b8c0a8c82073', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7
8
  {
9
  public static $files = array (
10
  'b45b351e6b6f7487d819961fef2fda77' => __DIR__ . '/..' . '/jakeasmith/http_build_url/src/http_build_url.php',
@@ -238,10 +238,10 @@ class ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7
238
  public static function getInitializer(ClassLoader $loader)
239
  {
240
  return \Closure::bind(function () use ($loader) {
241
- $loader->prefixLengthsPsr4 = ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7::$prefixLengthsPsr4;
242
- $loader->prefixDirsPsr4 = ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7::$prefixDirsPsr4;
243
- $loader->prefixesPsr0 = ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7::$prefixesPsr0;
244
- $loader->classMap = ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7::$classMap;
245
 
246
  }, null, ClassLoader::class);
247
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit312e08c087a223fe3e2271ca0d2b50a9
8
  {
9
  public static $files = array (
10
  'b45b351e6b6f7487d819961fef2fda77' => __DIR__ . '/..' . '/jakeasmith/http_build_url/src/http_build_url.php',
238
  public static function getInitializer(ClassLoader $loader)
239
  {
240
  return \Closure::bind(function () use ($loader) {
241
+ $loader->prefixLengthsPsr4 = ComposerStaticInit312e08c087a223fe3e2271ca0d2b50a9::$prefixLengthsPsr4;
242
+ $loader->prefixDirsPsr4 = ComposerStaticInit312e08c087a223fe3e2271ca0d2b50a9::$prefixDirsPsr4;
243
+ $loader->prefixesPsr0 = ComposerStaticInit312e08c087a223fe3e2271ca0d2b50a9::$prefixesPsr0;
244
+ $loader->classMap = ComposerStaticInit312e08c087a223fe3e2271ca0d2b50a9::$classMap;
245
 
246
  }, null, ClassLoader::class);
247
  }
wpml-woocommerce.php CHANGED
@@ -8,7 +8,7 @@
8
  Text Domain: woocommerce-multilingual
9
  Requires at least: 3.9
10
  Tested up to: 5.0.3
11
- Version: 4.4.1
12
  WC requires at least: 3.3.0
13
  WC tested up to: 3.5.4
14
  */
@@ -17,7 +17,7 @@ if ( defined( 'WCML_VERSION' ) ) {
17
  return;
18
  }
19
 
20
- define( 'WCML_VERSION', '4.4.1' );
21
  define( 'WCML_PLUGIN_PATH', dirname( __FILE__ ) );
22
  define( 'WCML_PLUGIN_FOLDER', basename( WCML_PLUGIN_PATH ) );
23
  define( 'WCML_LOCALE_PATH', WCML_PLUGIN_PATH . '/locale' );
8
  Text Domain: woocommerce-multilingual
9
  Requires at least: 3.9
10
  Tested up to: 5.0.3
11
+ Version: 4.4.2
12
  WC requires at least: 3.3.0
13
  WC tested up to: 3.5.4
14
  */
17
  return;
18
  }
19
 
20
+ define( 'WCML_VERSION', '4.4.2' );
21
  define( 'WCML_PLUGIN_PATH', dirname( __FILE__ ) );
22
  define( 'WCML_PLUGIN_FOLDER', basename( WCML_PLUGIN_PATH ) );
23
  define( 'WCML_LOCALE_PATH', WCML_PLUGIN_PATH . '/locale' );