Version Description
- Fixed a bug that was causing a PHP warning when using a WPML version prior 3.2
Download this release
Release Info
Developer | mihaimihai |
Plugin | WooCommerce Multilingual – run WooCommerce with WPML |
Version | 3.6.6 |
Comparing to | |
See all releases |
Code changes from version 3.6.5.1 to 3.6.6
- inc/missing-php-functions.php +9 -3
- inc/terms.class.php +6 -2
- readme.txt +5 -5
- wpml-woocommerce.php +2 -2
inc/missing-php-functions.php
CHANGED
@@ -63,10 +63,16 @@ function wcml_check_wpml_functions(){
|
|
63 |
}
|
64 |
|
65 |
if( !has_filter( 'wpml_translate_single_string' ) ){
|
66 |
-
|
67 |
-
add_filter( 'wpml_translate_single_string', 'icl_t', 10, 6 );
|
68 |
-
}
|
69 |
}
|
70 |
|
71 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
?>
|
63 |
}
|
64 |
|
65 |
if( !has_filter( 'wpml_translate_single_string' ) ){
|
66 |
+
add_filter( 'wpml_translate_single_string', 'wcml_translate_single_string_filter', 10, 6 );
|
|
|
|
|
67 |
}
|
68 |
|
69 |
}
|
70 |
+
|
71 |
+
function wcml_translate_single_string_filter( $original_value, $context, $name, $language_code = null, $has_translation = null, $disable_auto_register = false ) {
|
72 |
+
if( is_string($name) && function_exists( 'icl_t' ) ){
|
73 |
+
return icl_t( $context, $name, $original_value, $has_translation, $disable_auto_register, $language_code );
|
74 |
+
}else{
|
75 |
+
return $original_value;
|
76 |
+
}
|
77 |
+
}
|
78 |
?>
|
inc/terms.class.php
CHANGED
@@ -323,7 +323,7 @@ class WCML_Terms{
|
|
323 |
}
|
324 |
|
325 |
function translate_category_base($termlink, $term, $taxonomy){
|
326 |
-
global $wp_rewrite,$woocommerce_wpml,$wpml_term_translations;
|
327 |
static $no_recursion_flag;
|
328 |
|
329 |
// handles product categories, product tags and attributes
|
@@ -343,7 +343,11 @@ class WCML_Terms{
|
|
343 |
|
344 |
$no_recursion_flag = false;
|
345 |
|
346 |
-
|
|
|
|
|
|
|
|
|
347 |
|
348 |
if( $term_language ){
|
349 |
|
323 |
}
|
324 |
|
325 |
function translate_category_base($termlink, $term, $taxonomy){
|
326 |
+
global $wp_rewrite,$woocommerce_wpml,$wpml_term_translations,$sitepress;
|
327 |
static $no_recursion_flag;
|
328 |
|
329 |
// handles product categories, product tags and attributes
|
343 |
|
344 |
$no_recursion_flag = false;
|
345 |
|
346 |
+
if( !is_null( $wpml_term_translations ) ){
|
347 |
+
$term_language = $term->term_id ? $wpml_term_translations->get_element_lang_code($term->term_id) : false;
|
348 |
+
}else{
|
349 |
+
$term_language = $term->term_id ? $sitepress->get_language_for_element( $term->term_id, 'tax_'.$taxonomy ) : false;
|
350 |
+
}
|
351 |
|
352 |
if( $term_language ){
|
353 |
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Donate link: http://wpml.org/documentation/related-projects/woocommerce-multilin
|
|
4 |
Tags: CMS, woocommerce, commerce, ecommerce, e-commerce, products, WPML, multilingual, e-shop, shop
|
5 |
License: GPLv2
|
6 |
Requires at least: 3.0
|
7 |
-
Tested up to: 4.2.
|
8 |
-
Stable tag: 3.6.
|
9 |
|
10 |
Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
|
11 |
|
@@ -78,8 +78,8 @@ In order for the checkout and store pages to appear translated, you need to crea
|
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
-
= 3.6.
|
82 |
-
*
|
83 |
|
84 |
= 3.6.5 =
|
85 |
* Enabled the WooCommerce Bookings compatibility support
|
@@ -528,4 +528,4 @@ Fixed a few bugs. Added multi-currency mode.
|
|
528 |
Recommended update! Fixed a few bugs;
|
529 |
|
530 |
= 0.9 =
|
531 |
-
* First release
|
4 |
Tags: CMS, woocommerce, commerce, ecommerce, e-commerce, products, WPML, multilingual, e-shop, shop
|
5 |
License: GPLv2
|
6 |
Requires at least: 3.0
|
7 |
+
Tested up to: 4.2.3
|
8 |
+
Stable tag: 3.6.6
|
9 |
|
10 |
Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
|
11 |
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
+
= 3.6.6 =
|
82 |
+
* Fixed a bug that was causing a PHP warning when using a WPML version prior 3.2
|
83 |
|
84 |
= 3.6.5 =
|
85 |
* Enabled the WooCommerce Bookings compatibility support
|
528 |
Recommended update! Fixed a few bugs;
|
529 |
|
530 |
= 0.9 =
|
531 |
+
* First release
|
wpml-woocommerce.php
CHANGED
@@ -5,12 +5,12 @@
|
|
5 |
Description: Allows running fully multilingual e-Commerce sites with WooCommerce and WPML. <a href="http://wpml.org/documentation/related-projects/woocommerce-multilingual/">Documentation</a>.
|
6 |
Author: OnTheGoSystems
|
7 |
Author URI: http://www.onthegosystems.com/
|
8 |
-
Version: 3.6.
|
9 |
*/
|
10 |
|
11 |
|
12 |
if(defined('WCML_VERSION')) return;
|
13 |
-
define('WCML_VERSION', '3.6.
|
14 |
define('WCML_PLUGIN_PATH', dirname(__FILE__));
|
15 |
define('WCML_PLUGIN_FOLDER', basename(WCML_PLUGIN_PATH));
|
16 |
define('WCML_PLUGIN_URL', plugins_url() . '/' . WCML_PLUGIN_FOLDER);
|
5 |
Description: Allows running fully multilingual e-Commerce sites with WooCommerce and WPML. <a href="http://wpml.org/documentation/related-projects/woocommerce-multilingual/">Documentation</a>.
|
6 |
Author: OnTheGoSystems
|
7 |
Author URI: http://www.onthegosystems.com/
|
8 |
+
Version: 3.6.6
|
9 |
*/
|
10 |
|
11 |
|
12 |
if(defined('WCML_VERSION')) return;
|
13 |
+
define('WCML_VERSION', '3.6.6');
|
14 |
define('WCML_PLUGIN_PATH', dirname(__FILE__));
|
15 |
define('WCML_PLUGIN_FOLDER', basename(WCML_PLUGIN_PATH));
|
16 |
define('WCML_PLUGIN_URL', plugins_url() . '/' . WCML_PLUGIN_FOLDER);
|