Version Description
- Bug fixed: Redirection issues with "Your latest posts" as a front page
- Bug fixed: Yoast fileds not saved in WooCommerce Multilingual products table
- Bug fixed: Translated endpoints returns page not found
- Bug fixed: Custom fields are locked in variation section
Download this release
Release Info
Developer | sergey.r |
Plugin | WooCommerce Multilingual – run WooCommerce with WPML |
Version | 3.5.3 |
Comparing to | |
See all releases |
Code changes from version 3.5.2 to 3.5.3
- assets/js/lock_fields.js +27 -2
- inc/endpoints.class.php +9 -5
- inc/products.class.php +0 -1
- inc/store-pages.class.php +1 -1
- readme.txt +8 -2
- wpml-woocommerce.php +2 -2
assets/js/lock_fields.js
CHANGED
@@ -24,14 +24,39 @@ jQuery(document).ready(function($){
|
|
24 |
for (i = 0; i < inpt_names.length; i++) {
|
25 |
$('input[name="'+inpt_names[i]+'"]').attr('readonly','readonly');
|
26 |
$('input[name="'+inpt_names[i]+'"]').after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
}
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
$(this).attr('readonly','readonly');
|
31 |
$(this).after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
|
32 |
});
|
33 |
|
34 |
-
|
|
|
35 |
$(this).attr('disabled','disabled');
|
36 |
$(this).after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
|
37 |
});
|
24 |
for (i = 0; i < inpt_names.length; i++) {
|
25 |
$('input[name="'+inpt_names[i]+'"]').attr('readonly','readonly');
|
26 |
$('input[name="'+inpt_names[i]+'"]').after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
|
27 |
+
|
28 |
+
//variation fields
|
29 |
+
$('input[name^="variable'+inpt_names[i]+'"]').each(function(){
|
30 |
+
$(this).attr('readonly','readonly');
|
31 |
+
$(this).after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
|
32 |
+
});
|
33 |
+
}
|
34 |
+
|
35 |
+
//variation fields
|
36 |
+
var var_checkboxes = ['_enabled','_is_downloadable','_is_virtual','_manage_stock'];
|
37 |
+
for (i = 0; i < var_checkboxes.length; i++) {
|
38 |
+
$('input[name^="variable'+var_checkboxes[i]+'"]').each(function(){
|
39 |
+
$(this).attr('readonly','readonly');
|
40 |
+
$(this).after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
|
41 |
+
});
|
42 |
}
|
43 |
|
44 |
+
var var_selectboxes = ['_stock_status','_shipping_class','_tax_class'];
|
45 |
+
for (i = 0; i < var_selectboxes.length; i++) {
|
46 |
+
$('select[name^="variable'+var_selectboxes[i]+'"]').each(function(){
|
47 |
+
$(this).attr('disabled','disabled');
|
48 |
+
$(this).after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
|
49 |
+
});
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
$('.woocommerce_attribute_data td textarea,.attribute_values').each(function(){
|
54 |
$(this).attr('readonly','readonly');
|
55 |
$(this).after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
|
56 |
});
|
57 |
|
58 |
+
|
59 |
+
$('.woocommerce_variation>h3 select, #variable_product_options .toolbar select, .woocommerce_attribute_data input[type="checkbox"]').each(function(){
|
60 |
$(this).attr('disabled','disabled');
|
61 |
$(this).after($('.wcml_lock_img').clone().removeClass('wcml_lock_img').show());
|
62 |
});
|
inc/endpoints.class.php
CHANGED
@@ -1,15 +1,16 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
class WCML_Endpoints{
|
4 |
|
5 |
var $endpoints_strings = array();
|
6 |
-
|
7 |
function __construct(){
|
8 |
|
9 |
//endpoints hooks
|
10 |
add_action( 'plugins_loaded', array( $this, 'register_endpoints_translations' ), 2 );
|
11 |
add_action( 'icl_ajx_custom_call', array( $this, 'rewrite_rule_endpoints' ), 11, 2 );
|
12 |
add_action( 'woocommerce_settings_saved', array( $this, 'update_endpoints_rules' ) );
|
|
|
13 |
|
14 |
add_filter( 'page_link', array( $this, 'endpoint_permalink_filter' ), 10, 2 ); //after WPML
|
15 |
|
@@ -67,17 +68,20 @@ class WCML_Endpoints{
|
|
67 |
}
|
68 |
|
69 |
function add_endpoints(){
|
|
|
|
|
|
|
70 |
global $wpdb;
|
71 |
//add endpoints and flush rules
|
72 |
foreach( $this->endpoints_strings as $string_id ){
|
73 |
$strings = $wpdb->get_results( $wpdb->prepare( "SELECT value FROM {$wpdb->prefix}icl_string_translations WHERE string_id = %s AND status = 1", $string_id ) );
|
74 |
foreach( $strings as $string ){
|
75 |
-
add_rewrite_endpoint( $string->value, EP_PAGES );
|
76 |
}
|
77 |
}
|
78 |
flush_rewrite_rules();
|
79 |
}
|
80 |
-
|
81 |
function endpoint_permalink_filter( $p, $pid ){
|
82 |
global $post;
|
83 |
|
@@ -120,6 +124,6 @@ class WCML_Endpoints{
|
|
120 |
}
|
121 |
return $url;
|
122 |
}
|
123 |
-
|
124 |
|
125 |
}
|
1 |
<?php
|
2 |
+
|
3 |
class WCML_Endpoints{
|
4 |
|
5 |
var $endpoints_strings = array();
|
6 |
+
|
7 |
function __construct(){
|
8 |
|
9 |
//endpoints hooks
|
10 |
add_action( 'plugins_loaded', array( $this, 'register_endpoints_translations' ), 2 );
|
11 |
add_action( 'icl_ajx_custom_call', array( $this, 'rewrite_rule_endpoints' ), 11, 2 );
|
12 |
add_action( 'woocommerce_settings_saved', array( $this, 'update_endpoints_rules' ) );
|
13 |
+
add_action( 'init', array( $this, 'update_endpoints_rules' ) );
|
14 |
|
15 |
add_filter( 'page_link', array( $this, 'endpoint_permalink_filter' ), 10, 2 ); //after WPML
|
16 |
|
68 |
}
|
69 |
|
70 |
function add_endpoints(){
|
71 |
+
if( !isset( $this->endpoints_strings ) )
|
72 |
+
return;
|
73 |
+
|
74 |
global $wpdb;
|
75 |
//add endpoints and flush rules
|
76 |
foreach( $this->endpoints_strings as $string_id ){
|
77 |
$strings = $wpdb->get_results( $wpdb->prepare( "SELECT value FROM {$wpdb->prefix}icl_string_translations WHERE string_id = %s AND status = 1", $string_id ) );
|
78 |
foreach( $strings as $string ){
|
79 |
+
add_rewrite_endpoint( $string->value, EP_ROOT | EP_PAGES );
|
80 |
}
|
81 |
}
|
82 |
flush_rewrite_rules();
|
83 |
}
|
84 |
+
|
85 |
function endpoint_permalink_filter( $p, $pid ){
|
86 |
global $post;
|
87 |
|
124 |
}
|
125 |
return $url;
|
126 |
}
|
127 |
+
|
128 |
|
129 |
}
|
inc/products.class.php
CHANGED
@@ -690,7 +690,6 @@ class WCML_Products{
|
|
690 |
}
|
691 |
|
692 |
foreach ($all_meta as $key => $meta) {
|
693 |
-
if ( in_array( $key, $this->yoast_seo_fields ) ) continue;
|
694 |
if(isset($settings['translation-management']['custom_fields_translation'][$key]) && $settings['translation-management']['custom_fields_translation'][$key] == 0){
|
695 |
continue;
|
696 |
}
|
690 |
}
|
691 |
|
692 |
foreach ($all_meta as $key => $meta) {
|
|
|
693 |
if(isset($settings['translation-management']['custom_fields_translation'][$key]) && $settings['translation-management']['custom_fields_translation'][$key] == 0){
|
694 |
continue;
|
695 |
}
|
inc/store-pages.class.php
CHANGED
@@ -33,7 +33,6 @@ class WCML_Store_Pages{
|
|
33 |
}
|
34 |
|
35 |
$this->front_page_id = get_option('page_on_front');
|
36 |
-
$this->posts_page_id = get_option('page_for_posts');
|
37 |
$this->shop_page_id = wc_get_page_id('shop');
|
38 |
$this->shop_page = get_post( $this->shop_page_id );
|
39 |
|
@@ -147,6 +146,7 @@ class WCML_Store_Pages{
|
|
147 |
|
148 |
if (
|
149 |
!empty($this->shop_page) &&
|
|
|
150 |
$q->get('post_type') != 'product' &&
|
151 |
( $q->get('page_id') !== $this->front_page_id &&
|
152 |
(
|
33 |
}
|
34 |
|
35 |
$this->front_page_id = get_option('page_on_front');
|
|
|
36 |
$this->shop_page_id = wc_get_page_id('shop');
|
37 |
$this->shop_page = get_post( $this->shop_page_id );
|
38 |
|
146 |
|
147 |
if (
|
148 |
!empty($this->shop_page) &&
|
149 |
+
!empty($this->front_page_id) &&
|
150 |
$q->get('post_type') != 'product' &&
|
151 |
( $q->get('page_id') !== $this->front_page_id &&
|
152 |
(
|
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.1
|
8 |
-
Stable tag: 3.5.
|
9 |
|
10 |
Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
|
11 |
|
@@ -78,6 +78,12 @@ In order for the checkout and store pages to appear translated, you need to crea
|
|
78 |
|
79 |
== Changelog ==
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
= 3.5.2 =
|
82 |
* Compatibility with WooCommerce 2.3.x
|
83 |
* Bug fixed: Redirection issues with "Shop" page as front page
|
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.1.1
|
8 |
+
Stable tag: 3.5.3
|
9 |
|
10 |
Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
|
11 |
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
+
= 3.5.3 =
|
82 |
+
* Bug fixed: Redirection issues with "Your latest posts" as a front page
|
83 |
+
* Bug fixed: Yoast fileds not saved in WooCommerce Multilingual products table
|
84 |
+
* Bug fixed: Translated endpoints returns page not found
|
85 |
+
* Bug fixed: Custom fields are locked in variation section
|
86 |
+
|
87 |
= 3.5.2 =
|
88 |
* Compatibility with WooCommerce 2.3.x
|
89 |
* Bug fixed: Redirection issues with "Shop" page as front page
|
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.5.
|
9 |
*/
|
10 |
|
11 |
|
12 |
if(defined('WCML_VERSION')) return;
|
13 |
-
define('WCML_VERSION', '3.5.
|
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.5.3
|
9 |
*/
|
10 |
|
11 |
|
12 |
if(defined('WCML_VERSION')) return;
|
13 |
+
define('WCML_VERSION', '3.5.3');
|
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);
|