Changeset 852684
- Timestamp:
- 02/06/2014 04:18:11 PM (12 years ago)
- Location:
- woocommerce-multilingual/trunk
- Files:
-
- 5 edited
-
inc/terms.class.php (modified) (8 diffs)
-
inc/woocommerce-2.0-backward-compatibility.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
woocommerce_wpml.class.php (modified) (1 diff)
-
wpml-woocommerce.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-multilingual/trunk/inc/terms.class.php
r851250 r852684 22 22 add_filter('option_rewrite_rules', array($this, 'rewrite_rules_filter'), 3, 1); // high priority 23 23 24 add_filter('term_link', array($this, 'translate_category_base'), 3, 3); // high priority24 add_filter('term_link', array($this, 'translate_category_base'), 0, 3); // high priority 25 25 add_filter('term_link', array($this, 'translate_brand_link'), 10, 3); 26 26 … … 208 208 209 209 // handles product categories, product tags and attributes 210 210 211 211 $wc_taxonomies = wc_get_attribute_taxonomies(); 212 212 foreach($wc_taxonomies as $k => $v){ … … 219 219 if($link = wp_cache_get($cache_key, 'terms')){ 220 220 $termlink = $link; 221 222 221 }else{ 223 222 … … 230 229 231 230 $permalinks = get_option( 'woocommerce_permalinks' ); 232 $base = $taxonomy == 'product_tag' ? $permalinks['tag_base'] : ($taxonomy == ' category_tag' ? $permalinks['category_base'] : $permalinks['attribute_base']);231 $base = $taxonomy == 'product_tag' ? $permalinks['tag_base'] : ($taxonomy == 'product_cat' ? $permalinks['category_base'] : $permalinks['attribute_base']); 233 232 234 233 if($base === ''){ … … 260 259 }else{ 261 260 262 $string_identifier = $taxonomy == 'product_tag' || $taxonomy == 'product_category'? $taxonomy : 'attribute';261 $string_identifier = ($taxonomy == 'product_tag' || $taxonomy == 'product_cat') ? $taxonomy : 'attribute'; 263 262 264 263 if($term_language->language_code != $strings_language){ … … 269 268 WHERE s.value='". esc_sql($base)."' 270 269 AND s.language = '{$strings_language}' 271 AND s.name LIKE 'U RL{$string_identifier} slug:%'270 AND s.name LIKE 'Url {$string_identifier} slug:%' 272 271 AND t.language = '{$term_language->language_code}' 273 272 "); … … 284 283 $no_recursion_flag = true; 285 284 $termlink = get_term_link($term, $taxonomy); 286 285 287 286 $wp_rewrite->extra_permastructs[$taxonomy]['struct'] = $buff; 288 287 … … 614 613 if(isset( $attribute_taxonomies_arr ) && in_array($taxonomy, $attribute_taxonomies_arr)){ 615 614 616 $wcml_settings = $woocommerce_wpml->get_settings();617 618 // get term language619 $term_language = $sitepress->get_element_language_details($tt_id, 'tax_' . $taxonomy);620 621 if($term_language->language_code != $sitepress->get_default_language()){622 // get term in the default language623 $term_id = icl_object_id($term_id, $taxonomy, false, $sitepress->get_default_language());624 625 //does it belong to any posts (variations)626 $objects = get_objects_in_term($term_id, $taxonomy);627 628 if(!isset($wcml_settings['variations_needed'][$taxonomy])){629 $wcml_settings['variations_needed'][$taxonomy] = 0;630 }631 $wcml_settings['variations_needed'][$taxonomy] += count($objects);632 633 $woocommerce_wpml->update_settings($wcml_settings);634 635 }636 }615 $wcml_settings = $woocommerce_wpml->get_settings(); 616 617 // get term language 618 $term_language = $sitepress->get_element_language_details($tt_id, 'tax_' . $taxonomy); 619 620 if($term_language->language_code != $sitepress->get_default_language()){ 621 // get term in the default language 622 $term_id = icl_object_id($term_id, $taxonomy, false, $sitepress->get_default_language()); 623 624 //does it belong to any posts (variations) 625 $objects = get_objects_in_term($term_id, $taxonomy); 626 627 if(!isset($wcml_settings['variations_needed'][$taxonomy])){ 628 $wcml_settings['variations_needed'][$taxonomy] = 0; 629 } 630 $wcml_settings['variations_needed'][$taxonomy] += count($objects); 631 632 $woocommerce_wpml->update_settings($wcml_settings); 633 634 } 635 } 637 636 638 637 } -
woocommerce-multilingual/trunk/inc/woocommerce-2.0-backward-compatibility.php
r851250 r852684 59 59 } 60 60 61 add_filter('woocommerce_in_cart_product_title',array($this-> products, 'translated_cart_item_name'), 10, 3);61 add_filter('woocommerce_in_cart_product_title',array($this->strings, 'translated_cart_item_name'), 10, 3); 62 62 63 63 -
woocommerce-multilingual/trunk/readme.txt
r851250 r852684 6 6 Requires at least: 3.0 7 7 Tested up to: 3.8 8 Stable tag: 3.2 8 Stable tag: 3.2.1 9 9 10 10 Allows running fully multilingual e-commerce sites using WooCommerce and WPML. … … 77 77 78 78 == Changelog == 79 80 = 3.2.1 = 81 * Fixed bug related to product category urls translaiton 82 * Fixed bug related to back-compatibility with WooCommerce 2.0.20 79 83 80 84 = 3.2 = -
woocommerce-multilingual/trunk/woocommerce_wpml.class.php
r851250 r852684 41 41 } 42 42 43 $this->products = new WCML_Products;44 $this->store = new WCML_Store_Pages;45 $this->emails = new WCML_Emails;46 $this->terms = new WCML_Terms;47 $this->orders = new WCML_Orders;43 $this->products = new WCML_Products; 44 $this->store = new WCML_Store_Pages; 45 $this->emails = new WCML_Emails; 46 $this->terms = new WCML_Terms; 47 $this->orders = new WCML_Orders; 48 48 $this->troubleshooting = new WCML_Troubleshooting(); 49 $this->compatibility = new WCML_Compatibility(); 49 $this->compatibility = new WCML_Compatibility(); 50 $this->strings = new WCML_WC_Strings; 50 51 51 52 include WCML_PLUGIN_PATH . '/inc/woocommerce-2.0-backward-compatibility.php'; 52 53 53 54 new WCML_Ajax_Setup; 54 new WCML_WC_Strings;55 55 56 56 new WCML_Requests; -
woocommerce-multilingual/trunk/wpml-woocommerce.php
r851250 r852684 6 6 Author: ICanLocalize 7 7 Author URI: http://wpml.org/ 8 Version: 3.2 8 Version: 3.2.1 9 9 */ 10 10 11 11 if(defined('WCML_VERSION')) return; 12 define('WCML_VERSION', '3.2 ');12 define('WCML_VERSION', '3.2.1'); 13 13 define('WCML_PLUGIN_PATH', dirname(__FILE__)); 14 14 define('WCML_PLUGIN_FOLDER', basename(WCML_PLUGIN_PATH));
Note: See TracChangeset
for help on using the changeset viewer.