WooCommerce Multilingual – run WooCommerce with WPML - Version 4.7.4

Version Description

  • Fixed warning when some plugins using get_terms without taxonomy argument.
Download this release

Release Info

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

Code changes from version 4.7.3 to 4.7.4

changelog/4.7.3.md DELETED
@@ -1,3 +0,0 @@
1
- # Fixes
2
- * [wcml-2987] Fixed PHP Fatal error: Uncaught LogicException: A function must be an instance of \Twig_FunctionInterface or \Twig_SimpleFunction.
3
- * [wcml-2982] Fixed a fatal error that sometimes happened when updating WPML 4.1.0 to WPML 4.3.0.
 
 
 
changelog/4.7.4.md ADDED
@@ -0,0 +1,2 @@
 
 
1
+ # Fixes
2
+ * [wcml-3009] Fixed warning when some plugins using `get_terms` without `taxonomy` argument.
inc/class-wcml-terms.php CHANGED
@@ -683,19 +683,21 @@ class WCML_Terms{
683
 
684
  public function filter_shipping_classes_terms( $terms, $taxonomies, $args ){
685
 
686
- $on_wc_settings_page = isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] === 'wc-settings';
687
- $on_shipping_tab = isset( $_GET[ 'tab' ] ) && $_GET[ 'tab' ] === 'shipping';
688
- $on_classes_section = isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] === 'classes';
689
-
690
- if( is_admin() && in_array( 'product_shipping_class', $taxonomies ) && $on_wc_settings_page && $on_shipping_tab && !$on_classes_section ){
691
- remove_filter( 'get_terms', array( $this, 'filter_shipping_classes_terms' ) );
692
- remove_filter( 'get_terms', array( 'WPML_Terms_Translations', 'get_terms_filter' ), 10, 2 );
693
- $this->sitepress->switch_lang( $this->sitepress->get_default_language() );
694
- $terms = get_terms( $args );
695
- add_filter( 'get_terms', array( 'WPML_Terms_Translations', 'get_terms_filter' ), 10, 2 );
696
- add_filter( 'get_terms', array( $this, 'filter_shipping_classes_terms' ), 10, 3 );
697
- $this->sitepress->switch_lang();
698
- }
 
 
699
 
700
  return $terms;
701
  }
683
 
684
  public function filter_shipping_classes_terms( $terms, $taxonomies, $args ){
685
 
686
+ if( $taxonomies && is_admin() && in_array( 'product_shipping_class', $taxonomies ) ){
687
+ $on_wc_settings_page = isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] === 'wc-settings';
688
+ $on_shipping_tab = isset( $_GET[ 'tab' ] ) && $_GET[ 'tab' ] === 'shipping';
689
+ $on_classes_section = isset( $_GET[ 'section' ] ) && $_GET[ 'section' ] === 'classes';
690
+
691
+ if( $on_wc_settings_page && $on_shipping_tab && !$on_classes_section ){
692
+ remove_filter( 'get_terms', array( $this, 'filter_shipping_classes_terms' ) );
693
+ remove_filter( 'get_terms', array( 'WPML_Terms_Translations', 'get_terms_filter' ), 10, 2 );
694
+ $this->sitepress->switch_lang( $this->sitepress->get_default_language() );
695
+ $terms = get_terms( $args );
696
+ add_filter( 'get_terms', array( 'WPML_Terms_Translations', 'get_terms_filter' ), 10, 2 );
697
+ add_filter( 'get_terms', array( $this, 'filter_shipping_classes_terms' ), 10, 3 );
698
+ $this->sitepress->switch_lang();
699
+ }
700
+ }
701
 
702
  return $terms;
703
  }
readme.txt CHANGED
@@ -137,9 +137,8 @@ WooCommerce Multilingual is compatible with all major WooCommerce extensions. We
137
 
138
  == Changelog ==
139
 
140
- = 4.7.3 =
141
- * Fixed PHP Fatal error: Uncaught LogicException: A function must be an instance of \Twig_FunctionInterface or \Twig_SimpleFunction.
142
- * Fixed wrong language for some string on WooCommerce shipping settings page when switching admin language using language switcher.
143
 
144
  = 4.7.0 =
145
  * Replaced some Twig templates with pure PHP templates as the first step towards the removal of Twig dependencies.
137
 
138
  == Changelog ==
139
 
140
+ = 4.7.4 =
141
+ * Fixed warning when some plugins using `get_terms` without `taxonomy` argument.
 
142
 
143
  = 4.7.0 =
144
  * Replaced some Twig templates with pure PHP templates as the first step towards the removal of Twig dependencies.
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitc704f09bbaeb2888be7b4eaa53cd98b6::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitaa29be73d32a70e36d5628c27c0b9239::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitc704f09bbaeb2888be7b4eaa53cd98b6
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitc704f09bbaeb2888be7b4eaa53cd98b6
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitc704f09bbaeb2888be7b4eaa53cd98b6', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitc704f09bbaeb2888be7b4eaa53cd98b6', '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\ComposerStaticInitc704f09bbaeb2888be7b4eaa53cd98b6::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInitc704f09bbaeb2888be7b4eaa53cd98b6
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInitc704f09bbaeb2888be7b4eaa53cd98b6::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequirec704f09bbaeb2888be7b4eaa53cd98b6($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequirec704f09bbaeb2888be7b4eaa53cd98b6($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 ComposerAutoloaderInitaa29be73d32a70e36d5628c27c0b9239
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitaa29be73d32a70e36d5628c27c0b9239', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitaa29be73d32a70e36d5628c27c0b9239', '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\ComposerStaticInitaa29be73d32a70e36d5628c27c0b9239::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\ComposerStaticInitaa29be73d32a70e36d5628c27c0b9239::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequireaa29be73d32a70e36d5628c27c0b9239($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequireaa29be73d32a70e36d5628c27c0b9239($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitc704f09bbaeb2888be7b4eaa53cd98b6
8
  {
9
  public static $files = array (
10
  'b45b351e6b6f7487d819961fef2fda77' => __DIR__ . '/..' . '/jakeasmith/http_build_url/src/http_build_url.php',
@@ -235,9 +235,9 @@ class ComposerStaticInitc704f09bbaeb2888be7b4eaa53cd98b6
235
  public static function getInitializer(ClassLoader $loader)
236
  {
237
  return \Closure::bind(function () use ($loader) {
238
- $loader->prefixLengthsPsr4 = ComposerStaticInitc704f09bbaeb2888be7b4eaa53cd98b6::$prefixLengthsPsr4;
239
- $loader->prefixDirsPsr4 = ComposerStaticInitc704f09bbaeb2888be7b4eaa53cd98b6::$prefixDirsPsr4;
240
- $loader->classMap = ComposerStaticInitc704f09bbaeb2888be7b4eaa53cd98b6::$classMap;
241
 
242
  }, null, ClassLoader::class);
243
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitaa29be73d32a70e36d5628c27c0b9239
8
  {
9
  public static $files = array (
10
  'b45b351e6b6f7487d819961fef2fda77' => __DIR__ . '/..' . '/jakeasmith/http_build_url/src/http_build_url.php',
235
  public static function getInitializer(ClassLoader $loader)
236
  {
237
  return \Closure::bind(function () use ($loader) {
238
+ $loader->prefixLengthsPsr4 = ComposerStaticInitaa29be73d32a70e36d5628c27c0b9239::$prefixLengthsPsr4;
239
+ $loader->prefixDirsPsr4 = ComposerStaticInitaa29be73d32a70e36d5628c27c0b9239::$prefixDirsPsr4;
240
+ $loader->classMap = ComposerStaticInitaa29be73d32a70e36d5628c27c0b9239::$classMap;
241
 
242
  }, null, ClassLoader::class);
243
  }
vendor/otgs/installer/includes/class-installer-upgrader-skins.php CHANGED
@@ -23,7 +23,7 @@ class Installer_Upgrader_Skins extends WP_Upgrader_Skin {
23
 
24
  }
25
 
26
- function feedback( $string ) {
27
 
28
  }
29
 
23
 
24
  }
25
 
26
+ function feedback( $string, ...$args ) {
27
 
28
  }
29
 
vendor/otgs/installer/loader.php CHANGED
@@ -51,7 +51,7 @@ $wp_installer_instance = dirname( __FILE__ ) . '/installer.php';
51
  global $wp_installer_instances;
52
  $wp_installer_instances[ $wp_installer_instance ] = array(
53
  'bootfile' => $wp_installer_instance,
54
- 'version' => '2.2.1'
55
  );
56
 
57
 
51
  global $wp_installer_instances;
52
  $wp_installer_instances[ $wp_installer_instance ] = array(
53
  'bootfile' => $wp_installer_instance,
54
+ 'version' => '2.2.2'
55
  );
56
 
57
 
wpml-woocommerce.php CHANGED
@@ -8,7 +8,7 @@
8
  * Text Domain: woocommerce-multilingual
9
  * Requires at least: 4.7
10
  * Tested up to: 5.3
11
- * Version: 4.7.3
12
  * Plugin Slug: woocommerce-multilingual
13
  * WC requires at least: 3.3.0
14
  * WC tested up to: 3.8.0
@@ -33,7 +33,7 @@ if ( ! $wpml_php_version_check->is_ok() ) {
33
  return;
34
  }
35
 
36
- define( 'WCML_VERSION', '4.7.3' );
37
  define( 'WCML_PLUGIN_PATH', dirname( __FILE__ ) );
38
  define( 'WCML_PLUGIN_FOLDER', basename( WCML_PLUGIN_PATH ) );
39
  define( 'WCML_LOCALE_PATH', WCML_PLUGIN_PATH . '/locale' );
8
  * Text Domain: woocommerce-multilingual
9
  * Requires at least: 4.7
10
  * Tested up to: 5.3
11
+ * Version: 4.7.4
12
  * Plugin Slug: woocommerce-multilingual
13
  * WC requires at least: 3.3.0
14
  * WC tested up to: 3.8.0
33
  return;
34
  }
35
 
36
+ define( 'WCML_VERSION', '4.7.4' );
37
  define( 'WCML_PLUGIN_PATH', dirname( __FILE__ ) );
38
  define( 'WCML_PLUGIN_FOLDER', basename( WCML_PLUGIN_PATH ) );
39
  define( 'WCML_LOCALE_PATH', WCML_PLUGIN_PATH . '/locale' );