Version Description
- Fix product gallery images on default product with WC 3.6.0
- Fix wrong Table Rate Shipping wrong rate prices calculation in secondary currency with WC 3.6.0
Download this release
Release Info
Developer | sergey.r |
Plugin | WooCommerce Multilingual – run WooCommerce with WPML |
Version | 4.6.1 |
Comparing to | |
See all releases |
Code changes from version 4.6.0 to 4.6.1
- changelog/4.6.1.md +3 -0
- compatibility/class-wcml-table-rate-shipping.php +9 -2
- inc/class-wcml-products.php +12 -2
- readme.txt +5 -1
- vendor/autoload.php +1 -1
- vendor/autoload_52.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_real_52.php +3 -3
- vendor/composer/autoload_static.php +5 -5
- wpml-woocommerce.php +3 -3
changelog/4.6.1.md
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
# Fixes
|
2 |
+
* [wcml-2774] Fix product gallery images on default product with WC 3.6.0
|
3 |
+
* [wcml-2773] Fix wrong Table Rate Shipping wrong rate prices calculation in secondary currency with WC 3.6.0
|
compatibility/class-wcml-table-rate-shipping.php
CHANGED
@@ -158,11 +158,18 @@ class WCML_Table_Rate_Shipping {
|
|
158 |
$pointer_ui->show();
|
159 |
}
|
160 |
|
161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
public function filter_product_base_price( $row_base_price, $_product, $qty ){
|
163 |
|
164 |
if( $_product && get_option( 'woocommerce_currency') != $this->woocommerce_wpml->multi_currency->get_client_currency() ){
|
165 |
-
$row_base_price =
|
166 |
}
|
167 |
|
168 |
return $row_base_price;
|
158 |
$pointer_ui->show();
|
159 |
}
|
160 |
|
161 |
+
/**
|
162 |
+
* @param $row_base_price
|
163 |
+
* @param WC_Product $_product
|
164 |
+
* @param $qty
|
165 |
+
*
|
166 |
+
* @return mixed
|
167 |
+
*
|
168 |
+
*/
|
169 |
public function filter_product_base_price( $row_base_price, $_product, $qty ){
|
170 |
|
171 |
if( $_product && get_option( 'woocommerce_currency') != $this->woocommerce_wpml->multi_currency->get_client_currency() ){
|
172 |
+
$row_base_price = $this->woocommerce_wpml->products->get_product_price_from_db( $_product->get_id() ) * $qty;
|
173 |
}
|
174 |
|
175 |
return $row_base_price;
|
inc/class-wcml-products.php
CHANGED
@@ -685,9 +685,9 @@ class WCML_Products{
|
|
685 |
$price_keys = wcml_price_custom_fields( $product_id );
|
686 |
}
|
687 |
|
688 |
-
if( is_product() ){
|
689 |
$data['_product_image_gallery'] = null;
|
690 |
-
|
691 |
|
692 |
foreach ( $data as $meta_key => $meta_value ) {
|
693 |
|
@@ -717,4 +717,14 @@ class WCML_Products{
|
|
717 |
return $data;
|
718 |
}
|
719 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
720 |
}
|
685 |
$price_keys = wcml_price_custom_fields( $product_id );
|
686 |
}
|
687 |
|
688 |
+
if( is_product() && !$this->woocommerce_wpml->products->is_original_product( $product_id ) ){
|
689 |
$data['_product_image_gallery'] = null;
|
690 |
+
}
|
691 |
|
692 |
foreach ( $data as $meta_key => $meta_value ) {
|
693 |
|
717 |
return $data;
|
718 |
}
|
719 |
|
720 |
+
/**
|
721 |
+
* @param int $product_id
|
722 |
+
*
|
723 |
+
* @return null|string
|
724 |
+
*/
|
725 |
+
public function get_product_price_from_db( $product_id ){
|
726 |
+
|
727 |
+
return $this->wpdb->get_var( $this->wpdb->prepare( "SELECT meta_value FROM {$this->wpdb->postmeta} WHERE `meta_key` = '_price' AND post_id = %d ", $product_id ) );
|
728 |
+
}
|
729 |
+
|
730 |
}
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: CMS, woocommerce, commerce, ecommerce, e-commerce, products, WPML, multili
|
|
5 |
License: GPLv2
|
6 |
Requires at least: 4.7
|
7 |
Tested up to: 5.1.1
|
8 |
-
Stable tag: 4.6.
|
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.6.0 =
|
144 |
* Fix wrong currency code after removing item from manually created order
|
145 |
* Replace *_woocommerce_term_meta functions on *_term_meta
|
5 |
License: GPLv2
|
6 |
Requires at least: 4.7
|
7 |
Tested up to: 5.1.1
|
8 |
+
Stable tag: 4.6.1
|
9 |
|
10 |
Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
|
11 |
|
140 |
|
141 |
== Changelog ==
|
142 |
|
143 |
+
= 4.6.1 =
|
144 |
+
* Fix product gallery images on default product with WC 3.6.0
|
145 |
+
* Fix wrong Table Rate Shipping wrong rate prices calculation in secondary currency with WC 3.6.0
|
146 |
+
|
147 |
= 4.6.0 =
|
148 |
* Fix wrong currency code after removing item from manually created order
|
149 |
* Replace *_woocommerce_term_meta functions on *_term_meta
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitf4b81894d6c1c4bfe5ca8c9db4c92802::getLoader();
|
vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit0aac5ebccdea115bf8638e1f64dced7e::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderIniteff130337e9970a14836f2e0d29e7e53
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
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\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
@@ -48,19 +48,19 @@ class ComposerAutoloaderIniteff130337e9970a14836f2e0d29e7e53
|
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
-
$includeFiles = Composer\Autoload\
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
-
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
-
function
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitf4b81894d6c1c4bfe5ca8c9db4c92802
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitf4b81894d6c1c4bfe5ca8c9db4c92802', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitf4b81894d6c1c4bfe5ca8c9db4c92802', '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\ComposerStaticInitf4b81894d6c1c4bfe5ca8c9db4c92802::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\ComposerStaticInitf4b81894d6c1c4bfe5ca8c9db4c92802::$files;
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
+
composerRequiref4b81894d6c1c4bfe5ca8c9db4c92802($fileIdentifier, $file);
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
+
function composerRequiref4b81894d6c1c4bfe5ca8c9db4c92802($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
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitf9df06b740c92d3a63a4d7b27e1b059b {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInit0aac5ebccdea115bf8638e1f64dced7e {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit0aac5ebccdea115bf8638e1f64dced7e', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit0aac5ebccdea115bf8638e1f64dced7e', '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
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'b45b351e6b6f7487d819961fef2fda77' => __DIR__ . '/..' . '/jakeasmith/http_build_url/src/http_build_url.php',
|
@@ -242,10 +242,10 @@ class ComposerStaticIniteff130337e9970a14836f2e0d29e7e53
|
|
242 |
public static function getInitializer(ClassLoader $loader)
|
243 |
{
|
244 |
return \Closure::bind(function () use ($loader) {
|
245 |
-
$loader->prefixLengthsPsr4 =
|
246 |
-
$loader->prefixDirsPsr4 =
|
247 |
-
$loader->prefixesPsr0 =
|
248 |
-
$loader->classMap =
|
249 |
|
250 |
}, null, ClassLoader::class);
|
251 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitf4b81894d6c1c4bfe5ca8c9db4c92802
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'b45b351e6b6f7487d819961fef2fda77' => __DIR__ . '/..' . '/jakeasmith/http_build_url/src/http_build_url.php',
|
242 |
public static function getInitializer(ClassLoader $loader)
|
243 |
{
|
244 |
return \Closure::bind(function () use ($loader) {
|
245 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitf4b81894d6c1c4bfe5ca8c9db4c92802::$prefixLengthsPsr4;
|
246 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitf4b81894d6c1c4bfe5ca8c9db4c92802::$prefixDirsPsr4;
|
247 |
+
$loader->prefixesPsr0 = ComposerStaticInitf4b81894d6c1c4bfe5ca8c9db4c92802::$prefixesPsr0;
|
248 |
+
$loader->classMap = ComposerStaticInitf4b81894d6c1c4bfe5ca8c9db4c92802::$classMap;
|
249 |
|
250 |
}, null, ClassLoader::class);
|
251 |
}
|
wpml-woocommerce.php
CHANGED
@@ -8,16 +8,16 @@
|
|
8 |
Text Domain: woocommerce-multilingual
|
9 |
Requires at least: 4.7
|
10 |
Tested up to: 5.1.1
|
11 |
-
Version: 4.6.
|
12 |
WC requires at least: 3.3.0
|
13 |
-
WC tested up to: 3.6.
|
14 |
*/
|
15 |
|
16 |
if ( defined( 'WCML_VERSION' ) ) {
|
17 |
return;
|
18 |
}
|
19 |
|
20 |
-
define( 'WCML_VERSION', '4.6.
|
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: 4.7
|
10 |
Tested up to: 5.1.1
|
11 |
+
Version: 4.6.1
|
12 |
WC requires at least: 3.3.0
|
13 |
+
WC tested up to: 3.6.1
|
14 |
*/
|
15 |
|
16 |
if ( defined( 'WCML_VERSION' ) ) {
|
17 |
return;
|
18 |
}
|
19 |
|
20 |
+
define( 'WCML_VERSION', '4.6.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' );
|