Version Description
- Fixed a backward compatibility with WPML versions prior 3.2 (causing fatal error)
- Bug fix: in some specific cases variations were not created correctly - 'Any %name%' instead of term value
- Bug fix: updating a product for which attached media had been deleted caused a warning (WooCommerce issue: 9681)
- Fixed an issue with completing PayPal payments when using the default permalinks and the language as a parameter in the urls
- Fixed an issue with order notes in the WP admin: 'array' was displayed instead of the actual note
Download this release
Release Info
Developer | mihaimihai |
Plugin | WooCommerce Multilingual – run WooCommerce with WPML |
Version | 3.7.5 |
Comparing to | |
See all releases |
Code changes from version 3.7.4 to 3.7.5
- inc/orders.class.php +3 -2
- inc/products.class.php +11 -6
- inc/store-pages.class.php +1 -1
- inc/terms.class.php +4 -2
- menu/sub/settings.php +1 -1
- readme.txt +9 -2
- woocommerce_wpml.class.php +9 -2
- wpml-woocommerce.php +2 -2
inc/orders.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
class WCML_Orders{
|
3 |
|
4 |
private $standart_order_notes = array('Order status changed from %s to %s.',
|
5 |
-
'Order item stock reduced successfully.','Item #%s stock reduced from %s to %s.','Awaiting BACS payment','Awaiting cheque payment','Payment to be made upon delivery.',
|
6 |
'Validation error: PayPal amounts do not match (gross %s).','Validation error: PayPal IPN response from a different email address (%s).','Payment pending: %s',
|
7 |
'Payment %s via IPN.','Validation error: PayPal amounts do not match (amt %s).','IPN payment completed','PDT payment completed'
|
8 |
);
|
@@ -49,8 +49,9 @@ class WCML_Orders{
|
|
49 |
$string_id = icl_get_string_id( $text, 'woocommerce');
|
50 |
$strings = icl_get_string_translations_by_id( $string_id );
|
51 |
if($strings){
|
52 |
-
$translations = $strings[ $sitepress_settings['admin_default_language'] ];
|
53 |
}
|
|
|
54 |
}else{
|
55 |
return $text;
|
56 |
}
|
2 |
class WCML_Orders{
|
3 |
|
4 |
private $standart_order_notes = array('Order status changed from %s to %s.',
|
5 |
+
'Order item stock reduced successfully.','Item #%s stock reduced from %s to %s.','Item #%s stock increased from %s to %s.','Awaiting BACS payment','Awaiting cheque payment','Payment to be made upon delivery.',
|
6 |
'Validation error: PayPal amounts do not match (gross %s).','Validation error: PayPal IPN response from a different email address (%s).','Payment pending: %s',
|
7 |
'Payment %s via IPN.','Validation error: PayPal amounts do not match (amt %s).','IPN payment completed','PDT payment completed'
|
8 |
);
|
49 |
$string_id = icl_get_string_id( $text, 'woocommerce');
|
50 |
$strings = icl_get_string_translations_by_id( $string_id );
|
51 |
if($strings){
|
52 |
+
$translations = $strings[ $sitepress_settings['admin_default_language'] ]['value'];
|
53 |
}
|
54 |
+
|
55 |
}else{
|
56 |
return $text;
|
57 |
}
|
inc/products.class.php
CHANGED
@@ -62,7 +62,9 @@ class WCML_Products{
|
|
62 |
|
63 |
add_action( 'wp_ajax_woocommerce_feature_product' , array( $this, 'sync_feature_product_meta' ), 9 );
|
64 |
|
65 |
-
|
|
|
|
|
66 |
|
67 |
}else{
|
68 |
add_filter('woocommerce_json_search_found_products', array($this, 'filter_found_products_by_language'));
|
@@ -912,12 +914,14 @@ class WCML_Products{
|
|
912 |
$duplicated_ids = '';
|
913 |
if ( !$translation->original ) {
|
914 |
foreach( $gallery_ids as $image_id ){
|
915 |
-
|
916 |
-
|
|
|
917 |
|
918 |
-
|
|
|
|
|
919 |
}
|
920 |
-
$duplicated_ids .= $duplicated_id.',';
|
921 |
}
|
922 |
$duplicated_ids = substr( $duplicated_ids, 0, strlen( $duplicated_ids )-1 );
|
923 |
update_post_meta( $translation->element_id, '_product_image_gallery', $duplicated_ids );
|
@@ -1709,7 +1713,8 @@ class WCML_Products{
|
|
1709 |
if( isset( $_POST[ '_wcml_custom_prices' ][ $post_id ] ) ) {
|
1710 |
$wcml_custom_prices_option = $_POST[ '_wcml_custom_prices' ][ $post_id ];
|
1711 |
}else{
|
1712 |
-
$
|
|
|
1713 |
}
|
1714 |
|
1715 |
update_post_meta( $post_id, '_wcml_custom_prices_status', $wcml_custom_prices_option );
|
62 |
|
63 |
add_action( 'wp_ajax_woocommerce_feature_product' , array( $this, 'sync_feature_product_meta' ), 9 );
|
64 |
|
65 |
+
if ( defined( 'ICL_SITEPRESS_VERSION' ) && version_compare( ICL_SITEPRESS_VERSION, '3.2', '>=' ) ) {
|
66 |
+
$this->tp_support = new WCML_TP_Support();
|
67 |
+
}
|
68 |
|
69 |
}else{
|
70 |
add_filter('woocommerce_json_search_found_products', array($this, 'filter_found_products_by_language'));
|
914 |
$duplicated_ids = '';
|
915 |
if ( !$translation->original ) {
|
916 |
foreach( $gallery_ids as $image_id ){
|
917 |
+
if( get_post( $image_id ) ) {
|
918 |
+
$duplicated_id = apply_filters( 'translate_object_id', $image_id, 'attachment', false, $translation->language_code );
|
919 |
+
if ( is_null( $duplicated_id ) && $image_id ) {
|
920 |
|
921 |
+
$duplicated_id = WPML_media::create_duplicate_attachment( $image_id, wp_get_post_parent_id( $image_id ), $translation->language_code );
|
922 |
+
}
|
923 |
+
$duplicated_ids .= $duplicated_id . ',';
|
924 |
}
|
|
|
925 |
}
|
926 |
$duplicated_ids = substr( $duplicated_ids, 0, strlen( $duplicated_ids )-1 );
|
927 |
update_post_meta( $translation->element_id, '_product_image_gallery', $duplicated_ids );
|
1713 |
if( isset( $_POST[ '_wcml_custom_prices' ][ $post_id ] ) ) {
|
1714 |
$wcml_custom_prices_option = $_POST[ '_wcml_custom_prices' ][ $post_id ];
|
1715 |
}else{
|
1716 |
+
$current_option = get_post_meta( $post_id, '_wcml_custom_prices_status', true );
|
1717 |
+
$wcml_custom_prices_option = $current_option ? $current_option : 0;
|
1718 |
}
|
1719 |
|
1720 |
update_post_meta( $post_id, '_wcml_custom_prices_status', $wcml_custom_prices_option );
|
inc/store-pages.class.php
CHANGED
@@ -248,7 +248,7 @@ class WCML_Store_Pages{
|
|
248 |
|
249 |
function adjust_shop_page($q) {
|
250 |
global $sitepress;
|
251 |
-
if ($sitepress->get_default_language() != $sitepress->get_current_language()) {
|
252 |
if (!empty($q->query_vars['pagename'])) {
|
253 |
$shop_page = get_post( wc_get_page_id('shop') );
|
254 |
// we should explode by / for children page
|
248 |
|
249 |
function adjust_shop_page($q) {
|
250 |
global $sitepress;
|
251 |
+
if ( version_compare( ICL_SITEPRESS_VERSION, '3.3', '<=' ) && $sitepress->get_default_language() != $sitepress->get_current_language()) {
|
252 |
if (!empty($q->query_vars['pagename'])) {
|
253 |
$shop_page = get_post( wc_get_page_id('shop') );
|
254 |
// we should explode by / for children page
|
inc/terms.class.php
CHANGED
@@ -79,7 +79,9 @@ class WCML_Terms{
|
|
79 |
if( $original_tax->taxonomy == 'product_shipping_class' ){
|
80 |
|
81 |
$settings = get_option( 'woocommerce_flat_rate_settings' );
|
82 |
-
|
|
|
|
|
83 |
|
84 |
}
|
85 |
}
|
@@ -878,7 +880,7 @@ class WCML_Terms{
|
|
878 |
|
879 |
$trnsl_term_id = apply_filters( 'translate_object_id', $term_obj->term_id, $taxonomy, true, $language );
|
880 |
|
881 |
-
$filtered_terms[] = !$is_objects_array ? ( isset( $is_slug ) ? get_term( $trnsl_term_id, $taxonomy )->slug : get_term( $trnsl_term_id, $taxonomy )->name ) : get_term( $trnsl_term_id, $taxonomy );
|
882 |
}
|
883 |
|
884 |
return $filtered_terms;
|
79 |
if( $original_tax->taxonomy == 'product_shipping_class' ){
|
80 |
|
81 |
$settings = get_option( 'woocommerce_flat_rate_settings' );
|
82 |
+
if( is_array( $settings ) ){
|
83 |
+
update_option( 'woocommerce_flat_rate_settings', $this->update_woocommerce_flat_rate_settings( $settings ) );
|
84 |
+
}
|
85 |
|
86 |
}
|
87 |
}
|
880 |
|
881 |
$trnsl_term_id = apply_filters( 'translate_object_id', $term_obj->term_id, $taxonomy, true, $language );
|
882 |
|
883 |
+
$filtered_terms[] = !$is_objects_array ? ( isset( $is_slug ) ? get_term( $trnsl_term_id, $taxonomy )->slug : strtolower( get_term( $trnsl_term_id, $taxonomy )->name ) ) : get_term( $trnsl_term_id, $taxonomy );
|
884 |
}
|
885 |
|
886 |
return $filtered_terms;
|
menu/sub/settings.php
CHANGED
@@ -58,7 +58,7 @@ if( ( !WPML_SUPPORT_STRINGS_IN_DIFF_LANG && $default_language != 'en' && empty(
|
|
58 |
|
59 |
<?php if ( apply_filters( 'wpml_slug_translation_available', false ) ): ?>
|
60 |
<?php // Use new API for WPML >= 3.2.3 ?>
|
61 |
-
<p><i class="icon-warning-sign"></i><?php printf(__("Your product permalink base is not translated in %s. The urls for the translated products will not work. Go to the %
|
62 |
<?php else:?>
|
63 |
<p><i class="icon-warning-sign"></i><?php printf(__("Your product permalink base is not translated in %s. The urls for the translated products will not work. Go to the %sString Translation%s to translate.", 'woocommerce-multilingual'), '<b>'. implode(', ',$miss_slug_lang).'</b>' ,'<a href="'.admin_url('admin.php?page='.WPML_ST_FOLDER.'/menu/string-translation.php&search='.$prod_slug.'&context=WordPress&em=1').'">', '</a>') ?> </p>
|
64 |
<?php endif;?>
|
58 |
|
59 |
<?php if ( apply_filters( 'wpml_slug_translation_available', false ) ): ?>
|
60 |
<?php // Use new API for WPML >= 3.2.3 ?>
|
61 |
+
<p><i class="icon-warning-sign"></i><?php printf(__("Your product permalink base is not translated in %s. The urls for the translated products will not work. Go to the %sString Translation%s to translate.", 'woocommerce-multilingual'), '<b>'. implode(', ',$miss_slug_lang).'</b>' ,'<a href="' . admin_url('admin.php?page='.WPML_ST_FOLDER.'/menu/string-translation.php&search='.$prod_slug.'&context=WordPress&em=1') . '">', '</a>') ?> </p>
|
62 |
<?php else:?>
|
63 |
<p><i class="icon-warning-sign"></i><?php printf(__("Your product permalink base is not translated in %s. The urls for the translated products will not work. Go to the %sString Translation%s to translate.", 'woocommerce-multilingual'), '<b>'. implode(', ',$miss_slug_lang).'</b>' ,'<a href="'.admin_url('admin.php?page='.WPML_ST_FOLDER.'/menu/string-translation.php&search='.$prod_slug.'&context=WordPress&em=1').'">', '</a>') ?> </p>
|
64 |
<?php endif;?>
|
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.0
|
7 |
Tested up to: 4.3.1
|
8 |
-
Stable tag: 3.7.
|
9 |
|
10 |
Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
|
11 |
|
@@ -78,6 +78,13 @@ In order for the checkout and store pages to appear translated, you need to crea
|
|
78 |
|
79 |
== Changelog ==
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
= 3.7.4 =
|
82 |
* Fixed a problem with the previous version that caused a fatal error when upgrading
|
83 |
|
@@ -607,4 +614,4 @@ Fixed a few bugs. Added multi-currency mode.
|
|
607 |
Recommended update! Fixed a few bugs;
|
608 |
|
609 |
= 0.9 =
|
610 |
-
* First release
|
5 |
License: GPLv2
|
6 |
Requires at least: 3.0
|
7 |
Tested up to: 4.3.1
|
8 |
+
Stable tag: 3.7.5
|
9 |
|
10 |
Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
|
11 |
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
+
= 3.7.5 =
|
82 |
+
* Fixed a backward compatibility with WPML versions prior 3.2 (causing fatal error)
|
83 |
+
* Bug fix: in some specific cases variations were not created correctly - 'Any %name%' instead of term value
|
84 |
+
* Bug fix: updating a product for which attached media had been deleted caused a warning (WooCommerce issue: 9681)
|
85 |
+
* Fixed an issue with completing PayPal payments when using the default permalinks and the language as a parameter in the urls
|
86 |
+
* Fixed an issue with order notes in the WP admin: 'array' was displayed instead of the actual note
|
87 |
+
|
88 |
= 3.7.4 =
|
89 |
* Fixed a problem with the previous version that caused a fatal error when upgrading
|
90 |
|
614 |
Recommended update! Fixed a few bugs;
|
615 |
|
616 |
= 0.9 =
|
617 |
+
* First release
|
woocommerce_wpml.class.php
CHANGED
@@ -93,7 +93,7 @@ class woocommerce_wpml {
|
|
93 |
add_filter('woocommerce_get_return_url', array($this, 'filter_woocommerce_redirect_location'));
|
94 |
//add_filter('woocommerce_redirect', array($this, 'filter_woocommerce_redirect_location'));
|
95 |
|
96 |
-
add_filter('woocommerce_paypal_args', array($this, '
|
97 |
|
98 |
|
99 |
if(is_admin() &&
|
@@ -556,9 +556,16 @@ class woocommerce_wpml {
|
|
556 |
return html_entity_decode($sitepress->convert_url($link));
|
557 |
}
|
558 |
|
559 |
-
function
|
560 |
global $sitepress;
|
561 |
$args['lc'] = $sitepress->get_current_language();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
562 |
return $args;
|
563 |
}
|
564 |
|
93 |
add_filter('woocommerce_get_return_url', array($this, 'filter_woocommerce_redirect_location'));
|
94 |
//add_filter('woocommerce_redirect', array($this, 'filter_woocommerce_redirect_location'));
|
95 |
|
96 |
+
add_filter('woocommerce_paypal_args', array($this, 'filter_paypal_args'));
|
97 |
|
98 |
|
99 |
if(is_admin() &&
|
556 |
return html_entity_decode($sitepress->convert_url($link));
|
557 |
}
|
558 |
|
559 |
+
function filter_paypal_args($args) {
|
560 |
global $sitepress;
|
561 |
$args['lc'] = $sitepress->get_current_language();
|
562 |
+
|
563 |
+
//filter URL when default permalinks uses
|
564 |
+
$wpml_settings = $sitepress->get_settings();
|
565 |
+
if( $wpml_settings[ 'language_negotiation_type' ] == 3 ){
|
566 |
+
$args[ 'notify_url' ] = str_replace( '%2F&', '&', $args[ 'notify_url' ] );
|
567 |
+
}
|
568 |
+
|
569 |
return $args;
|
570 |
}
|
571 |
|
wpml-woocommerce.php
CHANGED
@@ -6,12 +6,12 @@
|
|
6 |
Author: OnTheGoSystems
|
7 |
Author URI: http://www.onthegosystems.com/
|
8 |
Text Domain: woocommerce-multilingual
|
9 |
-
Version: 3.7.
|
10 |
*/
|
11 |
|
12 |
|
13 |
if(defined('WCML_VERSION')) return;
|
14 |
-
define('WCML_VERSION', '3.7.
|
15 |
define('WCML_PLUGIN_PATH', dirname(__FILE__));
|
16 |
define('WCML_PLUGIN_FOLDER', basename(WCML_PLUGIN_PATH));
|
17 |
define('WCML_LOCALE_PATH',WCML_PLUGIN_PATH.'/locale');
|
6 |
Author: OnTheGoSystems
|
7 |
Author URI: http://www.onthegosystems.com/
|
8 |
Text Domain: woocommerce-multilingual
|
9 |
+
Version: 3.7.5
|
10 |
*/
|
11 |
|
12 |
|
13 |
if(defined('WCML_VERSION')) return;
|
14 |
+
define('WCML_VERSION', '3.7.5');
|
15 |
define('WCML_PLUGIN_PATH', dirname(__FILE__));
|
16 |
define('WCML_PLUGIN_FOLDER', basename(WCML_PLUGIN_PATH));
|
17 |
define('WCML_LOCALE_PATH',WCML_PLUGIN_PATH.'/locale');
|