WooCommerce Multilingual – run WooCommerce with WPML - Version 3.7.2

Version Description

  • Added synchronization for the 'featured' flag (star) for products across translations
  • Fixed one compatibility problem with WooCommerce Bookings: bookings were not filtered by language on the front end
  • Fixed one compatibility problem with WooCommerce Composite Products (causing a fatal error when viewing a composite product)
  • Bug fix: in some cases the cart total in a secondary currency was wrongfully rounded instead of showing the decimals
  • Bug fix: translated products were not published on the same schedule when using the future publishing
  • Bug fix: in some situations variations could not be created for a variable product with global attributes that contained special characters
  • Bug fix: wrong currency was used in an order when the currency was changed while placing the order and checkingout with Paypal
  • Bug fix: the relationship of a duplicate product with the original was lost when the original was updated.
Download this release

Release Info

Developer mihaimihai
Plugin Icon 128x128 WooCommerce Multilingual – run WooCommerce with WPML
Version 3.7.2
Comparing to
See all releases

Code changes from version 3.7 to 3.7.2

compatibility/wc_bookings.class.php CHANGED
@@ -1568,14 +1568,14 @@ class WCML_Bookings{
1568
  public function booking_filters_query( $query ) {
1569
  global $typenow, $sitepress, $wpdb;
1570
 
1571
- if ( $typenow == 'wc_booking' && isset( $_GET['post_type'] ) && $_GET['post_type'] == 'wc_booking' && !isset( $_GET['page'] )) {
1572
 
1573
  $product_ids = $wpdb->get_col( $wpdb->prepare(
1574
  "SELECT element_id
1575
  FROM {$wpdb->prefix}icl_translations
1576
  WHERE language_code = %s AND element_type = 'post_product'", $sitepress->get_current_language() ) );
1577
 
1578
- $query->query_vars[ 'meta_query' ] = array(
1579
  array(
1580
  'key' => '_booking_product_id',
1581
  'value' => $product_ids,
1568
  public function booking_filters_query( $query ) {
1569
  global $typenow, $sitepress, $wpdb;
1570
 
1571
+ if ( ( isset( $query->query_vars['post_type'] ) && $query->query_vars['post_type'] == 'wc_booking' ) || ( $typenow == 'wc_booking' && isset( $_GET['post_type'] ) && $_GET['post_type'] == 'wc_booking' && !isset( $_GET['page'] ) ) ) {
1572
 
1573
  $product_ids = $wpdb->get_col( $wpdb->prepare(
1574
  "SELECT element_id
1575
  FROM {$wpdb->prefix}icl_translations
1576
  WHERE language_code = %s AND element_type = 'post_product'", $sitepress->get_current_language() ) );
1577
 
1578
+ $query->query_vars[ 'meta_query' ][] = array(
1579
  array(
1580
  'key' => '_booking_product_id',
1581
  'value' => $product_ids,
compatibility/wc_composite_products.class.php CHANGED
@@ -10,8 +10,11 @@ class WCML_Composite_Products {
10
  }
11
 
12
  function woocommerce_composite_component_default_option($selected_value, $component_id, $object) {
13
- $selected_value = apply_filters('wpml_object_id', $selected_value, 'product');
14
-
 
 
 
15
  return $selected_value;
16
  }
17
 
10
  }
11
 
12
  function woocommerce_composite_component_default_option($selected_value, $component_id, $object) {
13
+
14
+ if( !empty( $selected_value ) )
15
+ $selected_value = apply_filters( 'wpml_object_id', $selected_value, 'product', true );
16
+
17
+
18
  return $selected_value;
19
  }
20
 
compatibility/wc_variation_swatches_photos.class.php CHANGED
@@ -10,30 +10,52 @@ class WCML_Variation_Swatches_and_Photos{
10
  global $sitepress, $wpdb;
11
 
12
  $atts = maybe_unserialize(get_post_meta($original_product_id, '_swatch_type_options', true));
13
- $lang = $sitepress->get_language_for_element($trnsl_product_id,'post_product');
 
 
 
 
 
14
  $tr_atts = $atts;
15
-
16
- foreach($atts as $att_name=>$att_opts){
17
- foreach($att_opts['attributes'] as $slug=>$options){
18
- global $woocommerce_wpml;
19
- $term_id = $woocommerce_wpml->products->wcml_get_term_id_by_slug( $att_name, $slug );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
- $tr_term_id = apply_filters( 'translate_object_id',$term_id,$att_name,false,$lang);
22
- if(!is_null($tr_term_id)){
23
- $tr_term = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->terms} t JOIN {$wpdb->term_taxonomy} x ON x.term_id = t.term_id WHERE t.term_id = %d AND x.taxonomy = %s", $tr_term_id, $att_name));
24
- $tr_slug = $tr_term->slug;
25
-
26
- if($tr_slug!=''){
27
- $tr_atts[$att_name]['attributes'][$tr_term->slug]= $atts[$att_name]['attributes'][$slug];
28
- if(isset($options['image'])){
29
- $o_img_id = $options['image'];
30
- $tr_img_id = apply_filters( 'translate_object_id',$o_img_id,'image',false,$lang);
31
- }
32
- unset($tr_atts[$att_name]['attributes'][$slug]);
33
- }
34
- }
35
- }
36
- }
37
  update_post_meta($trnsl_product_id,'_swatch_type_options',$tr_atts); // Meta gets overwritten
38
  }
39
 
10
  global $sitepress, $wpdb;
11
 
12
  $atts = maybe_unserialize(get_post_meta($original_product_id, '_swatch_type_options', true));
13
+
14
+ if (!is_array($atts)) {
15
+ return;
16
+ }
17
+
18
+ $lang = $sitepress->get_language_for_element($trnsl_product_id,'post_product');
19
  $tr_atts = $atts;
20
+
21
+ $original_product_post = get_post($original_product_id);
22
+
23
+ $original_product_taxonomies = get_object_taxonomies($original_product_post);
24
+
25
+ $original_product_terms = get_terms($original_product_taxonomies);
26
+
27
+ if (is_array($original_product_terms)) {
28
+
29
+ foreach ($atts as $att_name=>$att_opts) {
30
+
31
+ $attributes_hashed_names = array_keys($att_opts['attributes']);
32
+
33
+ foreach($original_product_terms as $original_product_term) {
34
+ $original_product_term_slug_md5 = md5($original_product_term->slug);
35
+
36
+ if (in_array($original_product_term_slug_md5, $attributes_hashed_names)) {
37
+
38
+ $translated_product_term_id = apply_filters('wpml_object_id', $original_product_term->term_id, $original_product_term->taxonomy, false, $lang);
39
+
40
+ $translated_product_term = get_term($translated_product_term_id, $original_product_term->taxonomy);
41
+
42
+ if (is_object($translated_product_term)) {
43
+
44
+ $translated_product_term_slug_md5 = md5($translated_product_term->slug);
45
+
46
+ $tr_atts[$att_name]['attributes'][$translated_product_term_slug_md5] = $tr_atts[$att_name]['attributes'][$original_product_term_slug_md5];
47
+
48
+ unset( $tr_atts[$att_name]['attributes'][$original_product_term_slug_md5] );
49
+ }
50
+
51
+ }
52
+
53
+ }
54
+
55
+ }
56
+
57
+ }
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  update_post_meta($trnsl_product_id,'_swatch_type_options',$tr_atts); // Meta gets overwritten
60
  }
61
 
inc/multi-currency-support.class.php CHANGED
@@ -100,6 +100,8 @@ class WCML_Multi_Currency_Support{
100
  add_filter('option_woocommerce_price_thousand_sep', array($this, 'filter_currency_thousand_sep_option'));
101
  add_filter('option_woocommerce_price_decimal_sep', array($this, 'filter_currency_decimal_sep_option'));
102
  add_filter('option_woocommerce_price_num_decimals', array($this, 'filter_currency_num_decimals_option'));
 
 
103
 
104
  }
105
 
@@ -653,6 +655,10 @@ class WCML_Multi_Currency_Support{
653
  return $value;
654
  }
655
 
 
 
 
 
656
 
657
  function check_admin_order_currency_code(){
658
  global $pagenow;
@@ -1017,6 +1023,11 @@ class WCML_Multi_Currency_Support{
1017
  }
1018
 
1019
  if($methods[$k]->cost){
 
 
 
 
 
1020
  $methods[$k]->cost = apply_filters('wcml_shipping_price_amount', $methods[$k]->cost);
1021
  }
1022
 
100
  add_filter('option_woocommerce_price_thousand_sep', array($this, 'filter_currency_thousand_sep_option'));
101
  add_filter('option_woocommerce_price_decimal_sep', array($this, 'filter_currency_decimal_sep_option'));
102
  add_filter('option_woocommerce_price_num_decimals', array($this, 'filter_currency_num_decimals_option'));
103
+
104
+ add_action( 'woocommerce_cart_loaded_from_session', array( $this, 'filter_currency_num_decimals_in_cart' ) );
105
 
106
  }
107
 
655
  return $value;
656
  }
657
 
658
+ function filter_currency_num_decimals_in_cart( $cart ){
659
+ $cart->dp = wc_get_price_decimals();
660
+ }
661
+
662
 
663
  function check_admin_order_currency_code(){
664
  global $pagenow;
1023
  }
1024
 
1025
  if($methods[$k]->cost){
1026
+
1027
+ if( isset($shipping_methods[$method->id]) && preg_match('/percent/', $shipping_methods[$method->id]->settings['cost']) ){
1028
+ continue;
1029
+ }
1030
+
1031
  $methods[$k]->cost = apply_filters('wcml_shipping_price_amount', $methods[$k]->cost);
1032
  }
1033
 
inc/orders.class.php CHANGED
@@ -33,6 +33,9 @@ class WCML_Orders{
33
  add_action( 'woocommerce_process_shop_order_meta', array( $this, 'set_order_language_backend'), 10, 2 );
34
  add_action( 'woocommerce_order_actions_start', array( $this, 'order_language_dropdown' ), 11 ); //after order currency drop-down
35
 
 
 
 
36
  }
37
 
38
  function filtered_woocommerce_new_order_note_data($translations, $text, $domain ){
@@ -240,5 +243,14 @@ class WCML_Orders{
240
 
241
  }
242
 
 
 
 
 
 
 
 
 
 
243
 
244
  }
33
  add_action( 'woocommerce_process_shop_order_meta', array( $this, 'set_order_language_backend'), 10, 2 );
34
  add_action( 'woocommerce_order_actions_start', array( $this, 'order_language_dropdown' ), 11 ); //after order currency drop-down
35
 
36
+ //special case for wcml-741
37
+ add_action('updated_post_meta', array($this,'update_order_currency'), 100,4);
38
+
39
  }
40
 
41
  function filtered_woocommerce_new_order_note_data($translations, $text, $domain ){
243
 
244
  }
245
 
246
+ function update_order_currency( $meta_id, $object_id, $meta_key, $meta_value ){
247
+ global $woocommerce_wpml;
248
+
249
+ if( $woocommerce_wpml->settings['enable_multi_currency'] == WCML_MULTI_CURRENCIES_INDEPENDENT && get_post_type($object_id) == 'shop_order' && isset( $_GET['wc-ajax'] ) && $_GET['wc-ajax'] == 'checkout' ){
250
+ update_post_meta( $object_id, '_order_currency', get_woocommerce_currency() );
251
+ }
252
+
253
+ }
254
+
255
 
256
  }
inc/products.class.php CHANGED
@@ -29,7 +29,9 @@ class WCML_Products{
29
  add_action( 'woocommerce_attribute_added', array( $this, 'make_new_attribute_translatable' ), 10, 2 );
30
 
31
  // filters to sync variable products
32
- add_action( 'save_post', array( $this, 'sync_post_action' ), 11, 2 ); // After WPML
 
 
33
  //when save new attachment duplicate product gallery
34
  add_action( 'wpml_media_create_duplicate_attachment', array( $this, 'sync_product_gallery_duplicate_attachment' ), 11, 2 );
35
  add_action( 'woocommerce_ajax_save_product_variations', array( $this, 'sync_product_variations_action' ), 11 );
@@ -55,6 +57,7 @@ class WCML_Products{
55
 
56
  add_filter( 'wpml_translation_job_post_meta_value_translated', array($this, 'filter_product_attributes_for_translation'), 10, 2 );
57
 
 
58
  }else{
59
  add_filter('woocommerce_json_search_found_products', array($this, 'filter_found_products_by_language'));
60
  add_filter( 'loop_shop_post_in', array( $this, 'filter_products_with_custom_prices' ), 100 );
@@ -1550,7 +1553,7 @@ class WCML_Products{
1550
 
1551
  // If we reach this point, we go ahead with sync.
1552
  // Remove filter to avoid double sync
1553
- remove_action( 'save_post', array( $this, 'sync_post_action' ), 11, 2 );
1554
 
1555
  do_action( 'wcml_before_sync_product', $duplicated_post_id, $post_id );
1556
 
@@ -1610,7 +1613,7 @@ class WCML_Products{
1610
  $this->sync_default_product_attr( $duplicated_post_id, $post_id, $lang );
1611
 
1612
  $this->sync_product_attr( $duplicated_post_id, $post_id );
1613
-
1614
  $this->update_order_for_product_translations( $duplicated_post_id );
1615
 
1616
  // synchronize post variations
@@ -3284,7 +3287,6 @@ class WCML_Products{
3284
  }
3285
 
3286
  function lock_variable_fields( $loop, $variation_data, $variation ){
3287
- global $woocommerce_wpml;
3288
 
3289
  $product_id = false;
3290
  if( ( isset( $_GET['post'] ) && get_post_type( $_GET['post'] ) == 'product' ) ){
@@ -3295,7 +3297,7 @@ class WCML_Products{
3295
 
3296
  if( !$product_id ){
3297
  return;
3298
- }elseif( !$woocommerce_wpml->products->is_original_product( $product_id ) ){ ?>
3299
  <script type="text/javascript">
3300
  jQuery(document).ready(function() {
3301
  wcml_lock_variation_fields();
@@ -3306,4 +3308,48 @@ class WCML_Products{
3306
 
3307
  }
3308
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3309
  }
29
  add_action( 'woocommerce_attribute_added', array( $this, 'make_new_attribute_translatable' ), 10, 2 );
30
 
31
  // filters to sync variable products
32
+ add_action( 'save_post', array( $this, 'sync_post_action' ), 110, 2 ); // After WPML
33
+
34
+ add_filter( 'future_product', array( $this, 'set_schedule_for_translations'), 10, 2 );
35
  //when save new attachment duplicate product gallery
36
  add_action( 'wpml_media_create_duplicate_attachment', array( $this, 'sync_product_gallery_duplicate_attachment' ), 11, 2 );
37
  add_action( 'woocommerce_ajax_save_product_variations', array( $this, 'sync_product_variations_action' ), 11 );
57
 
58
  add_filter( 'wpml_translation_job_post_meta_value_translated', array($this, 'filter_product_attributes_for_translation'), 10, 2 );
59
 
60
+ add_action( 'wp_ajax_woocommerce_feature_product' , array( $this, 'sync_feature_product_meta' ), 9 );
61
  }else{
62
  add_filter('woocommerce_json_search_found_products', array($this, 'filter_found_products_by_language'));
63
  add_filter( 'loop_shop_post_in', array( $this, 'filter_products_with_custom_prices' ), 100 );
1553
 
1554
  // If we reach this point, we go ahead with sync.
1555
  // Remove filter to avoid double sync
1556
+ remove_action( 'save_post', array( $this, 'sync_post_action' ), 110, 2 );
1557
 
1558
  do_action( 'wcml_before_sync_product', $duplicated_post_id, $post_id );
1559
 
1613
  $this->sync_default_product_attr( $duplicated_post_id, $post_id, $lang );
1614
 
1615
  $this->sync_product_attr( $duplicated_post_id, $post_id );
1616
+
1617
  $this->update_order_for_product_translations( $duplicated_post_id );
1618
 
1619
  // synchronize post variations
3287
  }
3288
 
3289
  function lock_variable_fields( $loop, $variation_data, $variation ){
 
3290
 
3291
  $product_id = false;
3292
  if( ( isset( $_GET['post'] ) && get_post_type( $_GET['post'] ) == 'product' ) ){
3297
 
3298
  if( !$product_id ){
3299
  return;
3300
+ }elseif( !$this->is_original_product( $product_id ) ){ ?>
3301
  <script type="text/javascript">
3302
  jQuery(document).ready(function() {
3303
  wcml_lock_variation_fields();
3308
 
3309
  }
3310
 
3311
+ function sync_feature_product_meta(){
3312
+
3313
+ if ( current_user_can( 'edit_products' ) && check_admin_referer( 'woocommerce-feature-product' ) ) {
3314
+ $product_id = absint( $_GET['product_id'] );
3315
+
3316
+ if ( 'product' === get_post_type( $product_id ) && $this->is_original_product( $product_id ) ) {
3317
+ global $sitepress;
3318
+
3319
+ $value = get_post_meta( $product_id, '_featured', true ) === 'yes' ? 'no' : 'yes';
3320
+
3321
+ $trid = $sitepress->get_element_trid( $product_id, 'post_product' );
3322
+ $translations = $sitepress->get_element_translations( $trid, 'post_product', true );
3323
+ foreach( $translations as $translation ){
3324
+
3325
+ if ( !$translation->original ) {
3326
+
3327
+ update_post_meta( $translation->element_id, '_featured', $value );
3328
+ }
3329
+ }
3330
+
3331
+ }
3332
+ }
3333
+
3334
+ }
3335
+
3336
+ function set_schedule_for_translations( $deprecated, $post ){
3337
+ global $sitepress;
3338
+
3339
+ if( $this->is_original_product( $post->ID ) ) {
3340
+
3341
+ $trid = $sitepress->get_element_trid( $post->ID, 'post_product');
3342
+ $translations = $sitepress->get_element_translations( $trid, 'post_product', true);
3343
+ foreach ($translations as $translation) {
3344
+
3345
+ if (!$translation->original) {
3346
+ wp_clear_scheduled_hook('publish_future_post', array($translation->element_id));
3347
+ wp_schedule_single_event(strtotime(get_gmt_from_date($post->post_date) . ' GMT'), 'publish_future_post', array($translation->element_id));
3348
+ }
3349
+ }
3350
+ }
3351
+
3352
+
3353
+ }
3354
+
3355
  }
inc/terms.class.php CHANGED
@@ -864,12 +864,21 @@ class WCML_Terms{
864
  foreach( $terms as $term ){
865
 
866
  if( !$is_objects_array ){
867
- $term = get_term_by( 'name', $term, $taxonomy );
 
 
 
 
 
 
 
 
 
868
  }
869
 
870
- $trnsl_term_id = apply_filters( 'translate_object_id', $term->term_id, $taxonomy, true, $language );
871
 
872
- $filtered_terms[] = !$is_objects_array ? get_term( $trnsl_term_id, $taxonomy )->name : get_term( $trnsl_term_id, $taxonomy );
873
  }
874
 
875
  return $filtered_terms;
864
  foreach( $terms as $term ){
865
 
866
  if( !$is_objects_array ){
867
+ $term_obj = get_term_by( 'name', $term, $taxonomy );
868
+ if( !$term_obj ){
869
+ $term_obj = get_term_by( 'slug', $term, $taxonomy );
870
+ $is_slug = true;
871
+ }
872
+ }
873
+
874
+ if( empty($term_obj) ){
875
+ $filtered_terms[] = $term;
876
+ continue;
877
  }
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;
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
8
- Stable tag: 3.7
9
 
10
  Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
11
 
@@ -78,8 +78,21 @@ In order for the checkout and store pages to appear translated, you need to crea
78
 
79
  == Changelog ==
80
 
81
-
82
- = 3.6.7 =
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  * Added support for strings in different languages. Translated strings are not required to be in English (Requires WPML 3.3+)
84
  * Fixed a compatibility issue with WooCommerce Bookings: bookings in all languages showing on calendar (requires WooCommerce Bookings 1.8+)
85
  * Fixed a compatibility issue with WooCommerce Bookings: deleting a reservation did not delete translations too (requires WooCommerce Bookings 1.8+)
5
  License: GPLv2
6
  Requires at least: 3.0
7
  Tested up to: 4.3
8
+ Stable tag: 3.7.2
9
 
10
  Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
11
 
78
 
79
  == Changelog ==
80
 
81
+ = 3.7.2 =
82
+ * Added synchronization for the 'featured' flag (star) for products across translations
83
+ * Fixed one compatibility problem with WooCommerce Bookings: bookings were not filtered by language on the front end
84
+ * Fixed one compatibility problem with WooCommerce Composite Products (causing a fatal error when viewing a composite product)
85
+ * Bug fix: in some cases the cart total in a secondary currency was wrongfully rounded instead of showing the decimals
86
+ * Bug fix: translated products were not published on the same schedule when using the future publishing
87
+ * Bug fix: in some situations variations could not be created for a variable product with global attributes that contained special characters
88
+ * Bug fix: wrong currency was used in an order when the currency was changed while placing the order and checkingout with Paypal
89
+ * Bug fix: the relationship of a duplicate product with the original was lost when the original was updated.
90
+
91
+ = 3.7.1 =
92
+ * Compatibility fixes for WooCommerce Bookings and WooCommerce Composite Products
93
+ * Fixed a typo in a function that caused a fatal error
94
+
95
+ = 3.7 =
96
  * Added support for strings in different languages. Translated strings are not required to be in English (Requires WPML 3.3+)
97
  * Fixed a compatibility issue with WooCommerce Bookings: bookings in all languages showing on calendar (requires WooCommerce Bookings 1.8+)
98
  * Fixed a compatibility issue with WooCommerce Bookings: deleting a reservation did not delete translations too (requires WooCommerce Bookings 1.8+)
woocommerce_wpml.class.php CHANGED
@@ -14,7 +14,7 @@ class woocommerce_wpml {
14
  function __construct(){
15
 
16
  add_action('init', array($this, 'init'),2);
17
- add_action('init', array($this, 'load_css_and_js'));
18
  add_action('widgets_init', array($this, 'register_widget'));
19
 
20
  }
@@ -33,6 +33,8 @@ class woocommerce_wpml {
33
 
34
  global $sitepress,$pagenow;
35
 
 
 
36
  if($this->settings['enable_multi_currency'] == WCML_MULTI_CURRENCIES_INDEPENDENT
37
  || ( isset($_GET['page']) && $_GET['page'] == 'wpml-wcml' && !isset($_GET['tab']) )
38
  || ( isset( $_POST[ 'action' ] ) && in_array( $_POST[ 'action' ], array( 'wcml_new_currency', 'wcml_save_currency', 'wcml_delete_currency', 'wcml_currencies_list', 'wcml_update_currency_lang', 'wcml_update_default_currency') ) )
@@ -483,6 +485,18 @@ class woocommerce_wpml {
483
  jQuery(".quick_hide a").on('click',function(){
484
  jQuery(".quick_product_trnsl_link").attr('href',jQuery("#wcml_product_trnsl_link").val()+jQuery(this).closest('tr').attr('id').replace(/post-/,''));
485
  });
 
 
 
 
 
 
 
 
 
 
 
 
486
  </script>
487
  <?php
488
  }
14
  function __construct(){
15
 
16
  add_action('init', array($this, 'init'),2);
17
+
18
  add_action('widgets_init', array($this, 'register_widget'));
19
 
20
  }
33
 
34
  global $sitepress,$pagenow;
35
 
36
+ $this->load_css_and_js();
37
+
38
  if($this->settings['enable_multi_currency'] == WCML_MULTI_CURRENCIES_INDEPENDENT
39
  || ( isset($_GET['page']) && $_GET['page'] == 'wpml-wcml' && !isset($_GET['tab']) )
40
  || ( isset( $_POST[ 'action' ] ) && in_array( $_POST[ 'action' ], array( 'wcml_new_currency', 'wcml_save_currency', 'wcml_delete_currency', 'wcml_currencies_list', 'wcml_update_currency_lang', 'wcml_update_default_currency') ) )
485
  jQuery(".quick_hide a").on('click',function(){
486
  jQuery(".quick_product_trnsl_link").attr('href',jQuery("#wcml_product_trnsl_link").val()+jQuery(this).closest('tr').attr('id').replace(/post-/,''));
487
  });
488
+
489
+ //lock feautured for translations
490
+ jQuery(document).on('click', '.featured a', function(){
491
+
492
+ if( jQuery(this).closest('tr').find('.quick_hide').size() > 0 ){
493
+
494
+ return false;
495
+
496
+ }
497
+
498
+ });
499
+
500
  </script>
501
  <?php
502
  }
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.2
10
  */
11
 
12
 
13
  if(defined('WCML_VERSION')) return;
14
+ define('WCML_VERSION', '3.7.2');
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');