WooCommerce Multilingual – run WooCommerce with WPML - Version 4.4.1

Version Description

  • Fixed catalog visibility not updating
  • Fix fatal error with Composite products
  • Fix fatal error with Woocommerce Product Addons
  • Removed options from WCML/Settings for handling Products translation since this can now be done with the post-switcher implemented in WPML 4.2.0
  • Fix fatal error when bundle product is false
  • Fix empty cart error with enabled option to clean cart when switching currency
  • Fixed issue with trailing comma in product gallery handling
Download this release

Release Info

Developer sergey.r
Plugin Icon 128x128 WooCommerce Multilingual – run WooCommerce with WPML
Version 4.4.1
Comparing to
See all releases

Code changes from version 4.4.0 to 4.4.1

changelog/4.4.1.md ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ # Fixes
2
+ * [wcml-2663] Fixed catalog visibility not updating
3
+ * [wcml-2662] Fix fatal error with Composite products
4
+ * [wcml-2661] Fix fatal error with Woocommerce Product Addons
5
+ * [wcml-2660] Removed options from WCML/Settings for handling Products translation since this can now be done with the post-switcher implemented in WPML 4.2.0
6
+ * [wcml-2659] Fix fatal error when bundle product is false
7
+ * [wcml-2652] Fix empty cart error with enabled option to clean cart when switching currency
8
+ * [wcml-2552] Fixed issue with trailing comma in product gallery handling
classes/class-woocommerce-wpml.php CHANGED
@@ -385,4 +385,9 @@ class woocommerce_wpml {
385
  public function js_min_suffix(){
386
  return WCML_JS_MIN;
387
  }
 
 
 
 
 
388
  }
385
  public function js_min_suffix(){
386
  return WCML_JS_MIN;
387
  }
388
+
389
+ public function is_wpml_prior_4_2(){
390
+ global $sitepress;
391
+ return $sitepress->get_wp_api()->version_compare( $sitepress->get_wp_api()->constant( 'ICL_SITEPRESS_VERSION' ), '4.2.0', '<' );
392
+ }
393
  }
classes/media/class-wml-append-gallery-to-post-media-ids.php CHANGED
@@ -14,12 +14,17 @@ class WCML_Append_Gallery_To_Post_Media_Ids implements IWPML_Action {
14
  public function add_product_gallery_images( $media_ids, $post_id ) {
15
  $product_gallery = get_post_meta( $post_id, '_product_image_gallery', true );
16
  if ( $product_gallery ) {
17
- $ids = array_map( 'intval', array_map( 'trim', explode( ',', $product_gallery ) ) );
18
- $media_ids = array_values( array_unique ( array_merge( $media_ids, $ids ) ) );
 
 
 
 
 
 
 
19
  }
20
 
21
- return $media_ids;
22
  }
23
-
24
-
25
- }
14
  public function add_product_gallery_images( $media_ids, $post_id ) {
15
  $product_gallery = get_post_meta( $post_id, '_product_image_gallery', true );
16
  if ( $product_gallery ) {
17
+ $ids = array_map(
18
+ 'intval',
19
+ array_map(
20
+ 'trim',
21
+ explode( ',', $product_gallery )
22
+ )
23
+ );
24
+
25
+ $media_ids = array_values( array_unique( array_merge( $media_ids, $ids ) ) );
26
  }
27
 
28
+ return array_filter( $media_ids );
29
  }
30
+ }
 
 
compatibility/class-wcml-bookings.php CHANGED
@@ -2542,7 +2542,8 @@ class WCML_Bookings {
2542
  if( !$product instanceof WC_Product ){
2543
  $product = wc_get_product( $product );
2544
  }
2545
- return $product->get_type() === 'booking';
 
2546
  }
2547
 
2548
  }
2542
  if( !$product instanceof WC_Product ){
2543
  $product = wc_get_product( $product );
2544
  }
2545
+
2546
+ return $product ? $product->get_type() === 'booking' : false;
2547
  }
2548
 
2549
  }
compatibility/class-wcml-composite-products.php CHANGED
@@ -559,7 +559,11 @@ class WCML_Composite_Products extends WCML_Compatibility_Helper{
559
  }
560
 
561
  public function apply_rounding_rules( $price ) {
562
- return $this->woocommerce_wpml->multi_currency->prices->apply_rounding_rules( $price );
 
 
 
 
563
  }
564
 
565
  }
559
  }
560
 
561
  public function apply_rounding_rules( $price ) {
562
+ if ( wcml_is_multi_currency_on() ) {
563
+ $price = $this->woocommerce_wpml->multi_currency->prices->apply_rounding_rules( $price );
564
+ }
565
+
566
+ return $price;
567
  }
568
 
569
  }
compatibility/class-wcml-dynamic-pricing.php CHANGED
@@ -87,7 +87,7 @@ class WCML_Dynamic_Pricing {
87
  * @return bool|WP_Error
88
  */
89
  function woocommerce_dynamic_pricing_is_applied_to( $process_discounts, $_product, $module_id, $obj, $cat_ids ) {
90
- if ( $cat_ids && ( ! empty( $obj->available_rulesets ) || ! empty( $obj->adjustment_sets ) ) ) {
91
 
92
  if ( ! is_array( $cat_ids ) ) {
93
  $cat_ids = array( $cat_ids );
87
  * @return bool|WP_Error
88
  */
89
  function woocommerce_dynamic_pricing_is_applied_to( $process_discounts, $_product, $module_id, $obj, $cat_ids ) {
90
+ if ( $_product && $cat_ids && ( ! empty( $obj->available_rulesets ) || ! empty( $obj->adjustment_sets ) ) ) {
91
 
92
  if ( ! is_array( $cat_ids ) ) {
93
  $cat_ids = array( $cat_ids );
compatibility/class-wcml-gravityforms.php CHANGED
@@ -2,7 +2,22 @@
2
 
3
  class WCML_gravityforms{
4
 
5
- function __construct(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  add_filter( 'gform_formatted_money', array( $this, 'wcml_convert_price' ), 10, 2 );
7
  add_filter( 'wcml_multi_currency_ajax_actions', array( $this, 'add_ajax_action' ) );
8
 
@@ -25,29 +40,33 @@ class WCML_gravityforms{
25
 
26
  function sync_gf_data($original_product_id, $trnsl_product_id, $data){
27
  // sync only if WCML editor is in use
28
- $wcml_settings = get_option('_wcml_settings');
29
- if ($wcml_settings['trnsl_interface'] != 1) {
30
- return;
31
- }
 
 
32
 
33
- $orig_gf = maybe_unserialize( get_post_meta( $original_product_id, '_gravity_form_data' , true ) );
34
- $trnsl_gf = maybe_unserialize( get_post_meta( $trnsl_product_id, '_gravity_form_data' , true ) );
35
-
36
- if( !$trnsl_gf ){
37
- update_post_meta( $trnsl_product_id, '_gravity_form_data', $orig_gf );
38
- }else{
39
- $trnsl_gf['id'] = $orig_gf['id'];
40
- $trnsl_gf['display_title'] = $orig_gf['display_title'];
41
- $trnsl_gf['display_description'] = $orig_gf['display_description'];
42
- $trnsl_gf['disable_woocommerce_price'] = $orig_gf['disable_woocommerce_price'];
43
- $trnsl_gf['disable_calculations'] = $orig_gf['disable_calculations'];
44
- $trnsl_gf['disable_label_subtotal'] = $orig_gf['disable_label_subtotal'];
45
- $trnsl_gf['disable_label_options'] = $orig_gf['disable_label_options'];
46
- $trnsl_gf['disable_label_total'] = $orig_gf['disable_label_total'];
47
- $trnsl_gf['disable_anchor'] = $orig_gf['disable_anchor'];
48
-
49
- update_post_meta( $trnsl_product_id, '_gravity_form_data', $trnsl_gf );
50
- }
 
 
51
  }
52
 
53
  }
2
 
3
  class WCML_gravityforms{
4
 
5
+ /**
6
+ * @param SitePress $sitepress
7
+ */
8
+ private $sitepress;
9
+
10
+ /**
11
+ * @var woocommerce_wpml
12
+ */
13
+ private $woocommerce_wpml;
14
+
15
+ public function __construct( SitePress $sitepress, woocommerce_wpml $woocommerce_wpml ) {
16
+ $this->sitepress = $sitepress;
17
+ $this->woocommerce_wpml = $woocommerce_wpml;
18
+ }
19
+
20
+ public function add_hooks(){
21
  add_filter( 'gform_formatted_money', array( $this, 'wcml_convert_price' ), 10, 2 );
22
  add_filter( 'wcml_multi_currency_ajax_actions', array( $this, 'add_ajax_action' ) );
23
 
40
 
41
  function sync_gf_data($original_product_id, $trnsl_product_id, $data){
42
  // sync only if WCML editor is in use
43
+ if( $this->woocommerce_wpml->is_wpml_prior_4_2() ){
44
+ $wcml_settings = get_option('_wcml_settings');
45
+ $is_using_tm_editor = $wcml_settings['trnsl_interface'];
46
+ }else{
47
+ $is_using_tm_editor = WPML_TM_Post_Edit_TM_Editor_Mode::is_using_tm_editor( $this->sitepress, $original_product_id );
48
+ }
49
 
50
+ if( $is_using_tm_editor ){
51
+ $orig_gf = maybe_unserialize( get_post_meta( $original_product_id, '_gravity_form_data' , true ) );
52
+ $trnsl_gf = maybe_unserialize( get_post_meta( $trnsl_product_id, '_gravity_form_data' , true ) );
53
+
54
+ if( !$trnsl_gf ){
55
+ update_post_meta( $trnsl_product_id, '_gravity_form_data', $orig_gf );
56
+ }else{
57
+ $trnsl_gf['id'] = $orig_gf['id'];
58
+ $trnsl_gf['display_title'] = $orig_gf['display_title'];
59
+ $trnsl_gf['display_description'] = $orig_gf['display_description'];
60
+ $trnsl_gf['disable_woocommerce_price'] = $orig_gf['disable_woocommerce_price'];
61
+ $trnsl_gf['disable_calculations'] = $orig_gf['disable_calculations'];
62
+ $trnsl_gf['disable_label_subtotal'] = $orig_gf['disable_label_subtotal'];
63
+ $trnsl_gf['disable_label_options'] = $orig_gf['disable_label_options'];
64
+ $trnsl_gf['disable_label_total'] = $orig_gf['disable_label_total'];
65
+ $trnsl_gf['disable_anchor'] = $orig_gf['disable_anchor'];
66
+
67
+ update_post_meta( $trnsl_product_id, '_gravity_form_data', $trnsl_gf );
68
+ }
69
+ }
70
  }
71
 
72
  }
compatibility/class-wcml-product-addons.php CHANGED
@@ -504,27 +504,28 @@ class WCML_Product_Addons {
504
  */
505
  public function update_custom_prices_values( $product_id ) {
506
 
507
- $this->save_global_addon_prices_setting( $product_id );
 
 
508
 
509
- $product_addons = $this->get_product_addons( $product_id );
510
-
511
- if ( $product_addons ) {
512
- $active_currencies = $this->woocommerce_wpml->multi_currency->get_currencies();
513
 
514
- foreach ( $product_addons as $addon_key => $product_addon ) {
515
 
516
- foreach ( $active_currencies as $code => $currency ) {
517
- $price_option_key = self::PRICE_OPTION_KEY;
518
 
519
- if( in_array( $product_addon['type'], $this->get_one_price_types() ) ){
520
- $product_addons = $this->update_single_option_prices( $product_addons, $price_option_key, $addon_key, $code );
521
- }else{
522
- $product_addons = $this->update_multiple_options_prices( $product_addons, $price_option_key, $addon_key, $code );
 
523
  }
524
  }
525
- }
526
 
527
- update_post_meta( $product_id, '_product_addons', $product_addons );
 
528
  }
529
  }
530
 
504
  */
505
  public function update_custom_prices_values( $product_id ) {
506
 
507
+ if( $this->is_multi_currency_on() ){
508
+ $this->save_global_addon_prices_setting( $product_id );
509
+ $product_addons = $this->get_product_addons( $product_id );
510
 
511
+ if ( $product_addons ) {
512
+ $active_currencies = $this->woocommerce_wpml->multi_currency->get_currencies();
 
 
513
 
514
+ foreach ( $product_addons as $addon_key => $product_addon ) {
515
 
516
+ foreach ( $active_currencies as $code => $currency ) {
517
+ $price_option_key = self::PRICE_OPTION_KEY;
518
 
519
+ if( in_array( $product_addon['type'], $this->get_one_price_types() ) ){
520
+ $product_addons = $this->update_single_option_prices( $product_addons, $price_option_key, $addon_key, $code );
521
+ }else{
522
+ $product_addons = $this->update_multiple_options_prices( $product_addons, $price_option_key, $addon_key, $code );
523
+ }
524
  }
525
  }
 
526
 
527
+ update_post_meta( $product_id, '_product_addons', $product_addons );
528
+ }
529
  }
530
  }
531
 
compatibility/class-wcml-product-bundles.php CHANGED
@@ -777,7 +777,10 @@ class WCML_Product_Bundles {
777
  }
778
 
779
  public function is_bundle_product( $product_id ){
780
- if ( 'bundle' === wc_get_product( $product_id )->get_type() ) {
 
 
 
781
  return true;
782
  }
783
 
@@ -787,7 +790,9 @@ class WCML_Product_Bundles {
787
  // #wcml-2241
788
  public function upgrade_bundles_items_relationships() {
789
 
790
- if ( ! get_option( 'wcml_upgrade_bundles_items_relationships' ) ) {
 
 
791
 
792
  $bundled_items = $this->wpdb->get_results( "SELECT bundled_item_id, bundle_id, product_id FROM {$this->wpdb->prefix}woocommerce_bundled_items" );
793
  $active_languages = $this->sitepress->get_active_languages();
777
  }
778
 
779
  public function is_bundle_product( $product_id ){
780
+
781
+ $product = wc_get_product( $product_id );
782
+
783
+ if ( $product && 'bundle' === $product->get_type() ) {
784
  return true;
785
  }
786
 
790
  // #wcml-2241
791
  public function upgrade_bundles_items_relationships() {
792
 
793
+ $table_exists = $this->wpdb->get_var( "SHOW TABLES LIKE '{$this->wpdb->prefix}woocommerce_bundled_items'" );
794
+
795
+ if ( $table_exists && ! get_option( 'wcml_upgrade_bundles_items_relationships' ) ) {
796
 
797
  $bundled_items = $this->wpdb->get_results( "SELECT bundled_item_id, bundle_id, product_id FROM {$this->wpdb->prefix}woocommerce_bundled_items" );
798
  $active_languages = $this->sitepress->get_active_languages();
compatibility/class-wcml-table-rate-shipping.php CHANGED
@@ -161,7 +161,7 @@ class WCML_Table_Rate_Shipping {
161
 
162
  public function filter_product_base_price( $row_base_price, $_product, $qty ){
163
 
164
- if( get_option( 'woocommerce_currency') != $this->woocommerce_wpml->multi_currency->get_client_currency() ){
165
  $row_base_price = apply_filters( 'wcml_product_price_by_currency', $_product->get_id(), get_option( 'woocommerce_currency') ) * $qty;
166
  }
167
 
161
 
162
  public function filter_product_base_price( $row_base_price, $_product, $qty ){
163
 
164
+ if( $_product && get_option( 'woocommerce_currency') != $this->woocommerce_wpml->multi_currency->get_client_currency() ){
165
  $row_base_price = apply_filters( 'wcml_product_price_by_currency', $_product->get_id(), get_option( 'woocommerce_currency') ) * $qty;
166
  }
167
 
compatibility/class-wcml-wc-subscriptions.php CHANGED
@@ -66,7 +66,7 @@ class WCML_WC_Subscriptions{
66
  */
67
  function subscriptions_product_sign_up_fee_filter( $subscription_sign_up_fee, $product ) {
68
 
69
- if ( wcml_is_multi_currency_on() ) {
70
  $currency = $this->woocommerce_wpml->multi_currency->get_client_currency();
71
 
72
  if ( $currency !== get_option( 'woocommerce_currency' ) ) {
@@ -260,7 +260,7 @@ class WCML_WC_Subscriptions{
260
 
261
  function woocommerce_subscription_price_from( $price, $product ){
262
 
263
- if ( in_array( $product->get_type(), array( 'variable-subscription', 'subscription_variation' ) ) ) {
264
 
265
  $variation_id = $product->get_meta( '_min_price_variation_id', true );
266
 
66
  */
67
  function subscriptions_product_sign_up_fee_filter( $subscription_sign_up_fee, $product ) {
68
 
69
+ if ( $product && wcml_is_multi_currency_on() ) {
70
  $currency = $this->woocommerce_wpml->multi_currency->get_client_currency();
71
 
72
  if ( $currency !== get_option( 'woocommerce_currency' ) ) {
260
 
261
  function woocommerce_subscription_price_from( $price, $product ){
262
 
263
+ if ( $product && in_array( $product->get_type(), array( 'variable-subscription', 'subscription_variation' ) ) ) {
264
 
265
  $variation_id = $product->get_meta( '_min_price_variation_id', true );
266
 
inc/admin-menus/class-wcml-admin-menus.php CHANGED
@@ -205,7 +205,10 @@ class WCML_Admin_Menus{
205
  public static function restrict_admin_with_redirect() {
206
  global $pagenow;
207
 
208
- if ( self::$woocommerce_wpml->settings['trnsl_interface'] ) {
 
 
 
209
 
210
  if (
211
  'post.php' === $pagenow &&
205
  public static function restrict_admin_with_redirect() {
206
  global $pagenow;
207
 
208
+ if (
209
+ self::$woocommerce_wpml->is_wpml_prior_4_2() &&
210
+ self::$woocommerce_wpml->settings['trnsl_interface'] )
211
+ {
212
 
213
  if (
214
  'post.php' === $pagenow &&
inc/class-wcml-cart.php CHANGED
@@ -76,8 +76,13 @@ class WCML_Cart {
76
 
77
  if (
78
  $wpml_cookies_enabled &&
79
- ( $cart_sync_settings['currency_switch'] === $this->sitepress->get_wp_api()->constant( 'WCML_CART_CLEAR' ) ||
80
- $cart_sync_settings['lang_switch'] === $this->sitepress->get_wp_api()->constant( 'WCML_CART_CLEAR' ) )
 
 
 
 
 
81
  ) {
82
  return true;
83
  }
76
 
77
  if (
78
  $wpml_cookies_enabled &&
79
+ (
80
+ (
81
+ $this->woocommerce_wpml->settings['enable_multi_currency'] === $this->sitepress->get_wp_api()->constant( 'WCML_MULTI_CURRENCIES_INDEPENDENT' ) &&
82
+ $cart_sync_settings['currency_switch'] === $this->sitepress->get_wp_api()->constant( 'WCML_CART_CLEAR' )
83
+ ) ||
84
+ $cart_sync_settings['lang_switch'] === $this->sitepress->get_wp_api()->constant( 'WCML_CART_CLEAR' )
85
+ )
86
  ) {
87
  return true;
88
  }
inc/class-wcml-compatibility.php CHANGED
@@ -90,7 +90,8 @@ class WCML_Compatibility {
90
 
91
  //Gravity Forms
92
  if ( class_exists( 'GFForms' ) ) {
93
- $this->gravityforms = new WCML_gravityforms();
 
94
  }
95
 
96
  //Sensei WooThemes
90
 
91
  //Gravity Forms
92
  if ( class_exists( 'GFForms' ) ) {
93
+ $this->gravityforms = new WCML_gravityforms( $this->sitepress, $this->woocommerce_wpml );
94
+ $this->gravityforms->add_hooks();
95
  }
96
 
97
  //Sensei WooThemes
inc/class-wcml-install.php CHANGED
@@ -19,10 +19,17 @@ class WCML_Install{
19
  $woocommerce_wpml->settings['wc_admin_options_saved'] = 1;
20
  }
21
 
22
- if ( ! isset( $woocommerce_wpml->settings['trnsl_interface'] ) ) {
23
- $woocommerce_wpml->settings['trnsl_interface'] = 1;
 
 
 
 
 
 
24
  }
25
 
 
26
  if ( ! isset( $woocommerce_wpml->settings['products_sync_date'] ) ) {
27
  $woocommerce_wpml->settings['products_sync_date'] = 1;
28
  }
19
  $woocommerce_wpml->settings['wc_admin_options_saved'] = 1;
20
  }
21
 
22
+ if( $woocommerce_wpml->is_wpml_prior_4_2() ){
23
+ if ( ! isset( $woocommerce_wpml->settings['trnsl_interface'] ) ) {
24
+ $woocommerce_wpml->settings['trnsl_interface'] = 1;
25
+ }
26
+ }else{
27
+ global $iclTranslationManagement;
28
+ $iclTranslationManagement->settings[ WPML_TM_Post_Edit_TM_Editor_Mode::TM_KEY_FOR_POST_TYPE_USE_NATIVE ][ 'product' ] = false;
29
+ $iclTranslationManagement->save_settings();
30
  }
31
 
32
+
33
  if ( ! isset( $woocommerce_wpml->settings['products_sync_date'] ) ) {
34
  $woocommerce_wpml->settings['products_sync_date'] = 1;
35
  }
inc/class-wcml-requests.php CHANGED
@@ -30,7 +30,9 @@ class WCML_Requests{
30
  if(isset($_POST['wcml_save_settings']) && wp_verify_nonce($nonce, 'wcml_save_settings_nonce')){
31
  global $sitepress,$sitepress_settings;
32
 
33
- $woocommerce_wpml->settings['trnsl_interface'] = filter_input( INPUT_POST, 'trnsl_interface', FILTER_SANITIZE_NUMBER_INT );
 
 
34
 
35
  $woocommerce_wpml->settings['products_sync_date'] = empty($_POST['products_sync_date']) ? 0 : 1;
36
  $woocommerce_wpml->settings['products_sync_order'] = empty($_POST['products_sync_order']) ? 0 : 1;
30
  if(isset($_POST['wcml_save_settings']) && wp_verify_nonce($nonce, 'wcml_save_settings_nonce')){
31
  global $sitepress,$sitepress_settings;
32
 
33
+ if ( isset( $_POST['trnsl_interface'] ) ){
34
+ $woocommerce_wpml->settings['trnsl_interface'] = filter_input( INPUT_POST, 'trnsl_interface', FILTER_SANITIZE_NUMBER_INT );
35
+ }
36
 
37
  $woocommerce_wpml->settings['products_sync_date'] = empty($_POST['products_sync_date']) ? 0 : 1;
38
  $woocommerce_wpml->settings['products_sync_order'] = empty($_POST['products_sync_order']) ? 0 : 1;
inc/class-wcml-resources.php CHANGED
@@ -28,7 +28,22 @@ class WCML_Resources {
28
  $is_original_product = isset( $_GET['post'] ) && !is_array( $_GET['post'] ) && self::$woocommerce_wpml->products->is_original_product( $_GET['post'] );
29
  $is_new_product = self::$pagenow == 'post-new.php' && isset($_GET['source_lang']) && isset($_GET['post_type']) && $_GET['post_type'] == 'product';
30
 
31
- if ( ($is_edit_product && !$is_original_product) || $is_new_product && !self::$woocommerce_wpml->settings['trnsl_interface'] ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  add_action( 'init', array(__CLASS__, 'load_lock_fields_js') );
33
  add_action( 'admin_footer', array(__CLASS__, 'hidden_label') );
34
  }
@@ -80,14 +95,18 @@ class WCML_Resources {
80
  wp_register_script( 'jquery-cookie', WCML_PLUGIN_URL . '/res/js/jquery.cookie' . WCML_JS_MIN . '.js', array( 'jquery' ), WCML_VERSION, true );
81
  wp_register_script( 'wcml-dialogs', WCML_PLUGIN_URL . '/res/js/dialogs' . WCML_JS_MIN . '.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-dialog' ), WCML_VERSION, true );
82
  wp_register_script( 'wcml-troubleshooting', WCML_PLUGIN_URL . '/res/js/troubleshooting' . WCML_JS_MIN . '.js', array( 'jquery' ), WCML_VERSION, true );
83
- wp_register_script( 'wcml-translation-interface-dialog-warning', WCML_PLUGIN_URL . '/res/js/trnsl_interface_dialog_warning' . WCML_JS_MIN . '.js', array( 'jquery' ), WCML_VERSION, true );
 
 
 
 
 
84
 
85
  wp_enqueue_script( 'wcml-scripts' );
86
  wp_enqueue_script( 'wp-color-picker');
87
  wp_enqueue_script( 'wcml-dialogs' );
88
  wp_enqueue_script( 'jquery-cookie' );
89
  wp_enqueue_script( 'wcml-troubleshooting' );
90
- wp_enqueue_script( 'wcml-translation-interface-dialog-warning' );
91
 
92
  wp_localize_script( 'wcml-scripts', 'wcml_settings',
93
  array(
28
  $is_original_product = isset( $_GET['post'] ) && !is_array( $_GET['post'] ) && self::$woocommerce_wpml->products->is_original_product( $_GET['post'] );
29
  $is_new_product = self::$pagenow == 'post-new.php' && isset($_GET['source_lang']) && isset($_GET['post_type']) && $_GET['post_type'] == 'product';
30
 
31
+ if( self::$woocommerce_wpml->is_wpml_prior_4_2() ){
32
+ $is_using_native_editor = !self::$woocommerce_wpml->settings['trnsl_interface'];
33
+ }else{
34
+ $tm_settings = $sitepress->get_setting( 'translation-management', array() );
35
+ if( $is_edit_product ){
36
+ $is_using_native_editor = WPML_TM_Post_Edit_TM_Editor_Mode::is_using_tm_editor( self::$sitepress, filter_var( $_GET['post'], FILTER_SANITIZE_NUMBER_INT ) );
37
+ }else{
38
+ $is_using_native_editor = isset( $tm_settings[ WPML_TM_Post_Edit_TM_Editor_Mode::TM_KEY_FOR_POST_TYPE_USE_NATIVE ][ 'product' ]) ? $tm_settings[ WPML_TM_Post_Edit_TM_Editor_Mode::TM_KEY_FOR_POST_TYPE_USE_NATIVE ][ 'product' ] : false;
39
+
40
+ if ( ! $is_using_native_editor ) {
41
+ $is_using_native_editor = isset( $tm_settings[ WPML_TM_Post_Edit_TM_Editor_Mode::TM_KEY_GLOBAL_USE_NATIVE ] ) ? $tm_settings[ WPML_TM_Post_Edit_TM_Editor_Mode::TM_KEY_GLOBAL_USE_NATIVE ] : false;
42
+ }
43
+ }
44
+ }
45
+
46
+ if ( ($is_edit_product && !$is_original_product) || $is_new_product && $is_using_native_editor ) {
47
  add_action( 'init', array(__CLASS__, 'load_lock_fields_js') );
48
  add_action( 'admin_footer', array(__CLASS__, 'hidden_label') );
49
  }
95
  wp_register_script( 'jquery-cookie', WCML_PLUGIN_URL . '/res/js/jquery.cookie' . WCML_JS_MIN . '.js', array( 'jquery' ), WCML_VERSION, true );
96
  wp_register_script( 'wcml-dialogs', WCML_PLUGIN_URL . '/res/js/dialogs' . WCML_JS_MIN . '.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-dialog' ), WCML_VERSION, true );
97
  wp_register_script( 'wcml-troubleshooting', WCML_PLUGIN_URL . '/res/js/troubleshooting' . WCML_JS_MIN . '.js', array( 'jquery' ), WCML_VERSION, true );
98
+
99
+ if( self::$woocommerce_wpml->is_wpml_prior_4_2() ){
100
+ wp_register_script( 'wcml-translation-interface-dialog-warning', WCML_PLUGIN_URL . '/res/js/trnsl_interface_dialog_warning' . WCML_JS_MIN . '.js', array( 'jquery' ), WCML_VERSION, true );
101
+ wp_enqueue_script( 'wcml-translation-interface-dialog-warning' );
102
+ }
103
+
104
 
105
  wp_enqueue_script( 'wcml-scripts' );
106
  wp_enqueue_script( 'wp-color-picker');
107
  wp_enqueue_script( 'wcml-dialogs' );
108
  wp_enqueue_script( 'jquery-cookie' );
109
  wp_enqueue_script( 'wcml-troubleshooting' );
 
110
 
111
  wp_localize_script( 'wcml-scripts', 'wcml_settings',
112
  array(
inc/class-wcml-upgrade.php CHANGED
@@ -26,7 +26,8 @@ class WCML_Upgrade{
26
  '4.2.11',
27
  '4.3.0',
28
  '4.3.4',
29
- '4.3.5'
 
30
  );
31
 
32
  function __construct(){
@@ -727,4 +728,23 @@ class WCML_Upgrade{
727
 
728
  }
729
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
730
  }
26
  '4.2.11',
27
  '4.3.0',
28
  '4.3.4',
29
+ '4.3.5',
30
+ '4.4.1'
31
  );
32
 
33
  function __construct(){
728
 
729
  }
730
 
731
+ private function upgrade_4_4_1() {
732
+ global $sitepress,$woocommerce_wpml;
733
+
734
+ if( !$woocommerce_wpml->is_wpml_prior_4_2() ){
735
+
736
+ $wcml_settings = get_option( '_wcml_settings' );
737
+ $tm_settings = $sitepress->get_setting( 'translation-management', array() );
738
+
739
+ if( $wcml_settings['trnsl_interface'] ){
740
+ $tm_settings[ WPML_TM_Post_Edit_TM_Editor_Mode::TM_KEY_FOR_POST_TYPE_USE_NATIVE ][ 'product' ] = false;
741
+ }else{
742
+ $tm_settings[ WPML_TM_Post_Edit_TM_Editor_Mode::TM_KEY_FOR_POST_TYPE_USE_NATIVE ][ 'product' ] = true;
743
+ }
744
+
745
+ $sitepress->set_setting( 'translation-management', $tm_settings, true );
746
+ }
747
+
748
+ }
749
+
750
  }
inc/template-classes/class-wcml-settings-ui.php CHANGED
@@ -27,24 +27,6 @@ class WCML_Settings_UI extends WPML_Templates_Factory {
27
  'form' => array(
28
  'action' => $_SERVER['REQUEST_URI'],
29
 
30
- 'translation_interface' => array(
31
- 'heading' => __('Product Translation Interface','woocommerce-multilingual'),
32
- 'tip' => __( 'The recommended way is using the WPML Translation Editor. It is streamlined for making the translation process much easier while also providing a much better integration with various WooCommerce extensions.',
33
- 'woocommerce-multilingual' ),
34
- 'wcml' => array(
35
- 'label' => __('WPML Translation Editor', 'woocommerce-multilingual'),
36
-
37
- ),
38
- 'native' => array(
39
- 'label' => __('Native WooCommerce product editing screen' , 'woocommerce-multilingual'),
40
-
41
- ),
42
- 'controls_value' => $this->woocommerce_wpml->settings['trnsl_interface'],
43
- 'pb_warning' => __("If you are using a page builder to design WooCommerce products, you should only use WPML's Translation Editor.", 'woocommerce-multilingual'),
44
- 'pb_warning_ok_button' => __('OK (translate with the WordPress editor)', 'woocommerce-multilingual'),
45
- 'pb_warning_cancel_button' => __('Cancel (stay with the Translation Editor)', 'woocommerce-multilingual'),
46
- ),
47
-
48
  'synchronization' => array(
49
  'heading' => __('Products Synchronization', 'woocommerce-multilingual'),
50
  'tip' => __( 'Configure specific product properties that should be synced to translations.', 'woocommerce-multilingual' ),
@@ -110,6 +92,26 @@ class WCML_Settings_UI extends WPML_Templates_Factory {
110
  )
111
  );
112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  return $model;
114
 
115
  }
27
  'form' => array(
28
  'action' => $_SERVER['REQUEST_URI'],
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  'synchronization' => array(
31
  'heading' => __('Products Synchronization', 'woocommerce-multilingual'),
32
  'tip' => __( 'Configure specific product properties that should be synced to translations.', 'woocommerce-multilingual' ),
92
  )
93
  );
94
 
95
+ if( $this->woocommerce_wpml->is_wpml_prior_4_2() ){
96
+ $model['form']['translation_interface'] = array(
97
+ 'heading' => __('Product Translation Interface','woocommerce-multilingual'),
98
+ 'tip' => __( 'The recommended way is using the WPML Translation Editor. It is streamlined for making the translation process much easier while also providing a much better integration with various WooCommerce extensions.',
99
+ 'woocommerce-multilingual' ),
100
+ 'wcml' => array(
101
+ 'label' => __('WPML Translation Editor', 'woocommerce-multilingual'),
102
+
103
+ ),
104
+ 'native' => array(
105
+ 'label' => __('Native WooCommerce product editing screen' , 'woocommerce-multilingual'),
106
+
107
+ ),
108
+ 'controls_value' => $this->woocommerce_wpml->settings['trnsl_interface'],
109
+ 'pb_warning' => __("If you are using a page builder to design WooCommerce products, you should only use WPML's Translation Editor.", 'woocommerce-multilingual'),
110
+ 'pb_warning_ok_button' => __('OK (translate with the WordPress editor)', 'woocommerce-multilingual'),
111
+ 'pb_warning_cancel_button' => __('Cancel (stay with the Translation Editor)', 'woocommerce-multilingual'),
112
+ );
113
+ }
114
+
115
  return $model;
116
 
117
  }
inc/translation-editor/class-wcml-synchronize-product-data.php CHANGED
@@ -104,7 +104,14 @@ class WCML_Synchronize_Product_Data{
104
  do_action( 'wcml_before_sync_product', $original_product_id, $post_id );
105
 
106
  //trnsl_interface option
107
- if ( !$this->woocommerce_wpml->settings['trnsl_interface'] && $original_language != $current_language ) {
 
 
 
 
 
 
 
108
  if( !isset( $_POST[ 'wp-preview' ] ) || empty( $_POST[ 'wp-preview' ] ) ){
109
  //make sure we sync post in current language
110
  $post_id = apply_filters( 'translate_object_id', $post_id, 'product', false, $current_language );
@@ -697,7 +704,7 @@ class WCML_Synchronize_Product_Data{
697
  }
698
 
699
  public function sync_product_translations_visibility( $product_id ) {
700
- $translations = $this->post_translations->get_element_translations( $product_id );
701
  if ( $translations ) {
702
 
703
  $product = wc_get_product( $product_id );
104
  do_action( 'wcml_before_sync_product', $original_product_id, $post_id );
105
 
106
  //trnsl_interface option
107
+ if( $this->woocommerce_wpml->is_wpml_prior_4_2() ){
108
+ $is_using_native_editor = !self::$woocommerce_wpml->settings['trnsl_interface'];
109
+ }else{
110
+ $is_using_native_editor = !WPML_TM_Post_Edit_TM_Editor_Mode::is_using_tm_editor( $this->sitepress, $original_product_id );
111
+ }
112
+
113
+
114
+ if ( $is_using_native_editor && $original_language != $current_language ) {
115
  if( !isset( $_POST[ 'wp-preview' ] ) || empty( $_POST[ 'wp-preview' ] ) ){
116
  //make sure we sync post in current language
117
  $post_id = apply_filters( 'translate_object_id', $post_id, 'product', false, $current_language );
704
  }
705
 
706
  public function sync_product_translations_visibility( $product_id ) {
707
+ $translations = $this->post_translations->get_element_translations( $product_id, false, true );
708
  if ( $translations ) {
709
 
710
  $product = wc_get_product( $product_id );
inc/translation-editor/class-wcml-translation-editor.php CHANGED
@@ -29,8 +29,17 @@ class WCML_Translation_Editor{
29
  add_action( 'woocommerce_product_after_variable_attributes', array( $this, 'lock_variable_fields' ), 10 );
30
 
31
  if( is_admin() ){
32
- add_filter( 'wpml_use_tm_editor', array( $this, 'force_woocommerce_native_editor'), 100 );
33
- add_action( 'wpml_pre_status_icon_display', array( $this, 'force_remove_wpml_translation_editor_links'), 100 );
 
 
 
 
 
 
 
 
 
34
  add_action( 'wp_ajax_wcml_editor_auto_slug', array( $this, 'auto_generate_slug' ) );
35
 
36
  add_action('wpml_doc_translation_method_below', array( $this, 'wpml_translation_editor_override_notice') );
@@ -262,8 +271,6 @@ class WCML_Translation_Editor{
262
  if ( !$this->woocommerce_wpml->settings['trnsl_interface'] ) {
263
  $use_tm_editor = 0;
264
  }
265
- } elseif ( $current_screen->id === 'woocommerce_page_wpml-wcml' ) {
266
- $use_tm_editor = 1;
267
  }
268
  }
269
 
@@ -272,6 +279,24 @@ class WCML_Translation_Editor{
272
  return $use_tm_editor;
273
  }
274
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  /**
276
  * Removes the translation editor links when the WooCommerce native products editor is used in WCML
277
  */
29
  add_action( 'woocommerce_product_after_variable_attributes', array( $this, 'lock_variable_fields' ), 10 );
30
 
31
  if( is_admin() ){
32
+
33
+ add_filter( 'wpml_use_tm_editor', array( $this, 'force_woocommerce_native_editor_for_wcml_products_screen' ), 100 );
34
+
35
+ if( $this->woocommerce_wpml->is_wpml_prior_4_2() ) {
36
+ add_filter( 'wpml_use_tm_editor', array( $this, 'force_woocommerce_native_editor' ), 100 );
37
+ add_action( 'wpml_pre_status_icon_display', array(
38
+ $this,
39
+ 'force_remove_wpml_translation_editor_links'
40
+ ), 100 );
41
+ }
42
+
43
  add_action( 'wp_ajax_wcml_editor_auto_slug', array( $this, 'auto_generate_slug' ) );
44
 
45
  add_action('wpml_doc_translation_method_below', array( $this, 'wpml_translation_editor_override_notice') );
271
  if ( !$this->woocommerce_wpml->settings['trnsl_interface'] ) {
272
  $use_tm_editor = 0;
273
  }
 
 
274
  }
275
  }
276
 
279
  return $use_tm_editor;
280
  }
281
 
282
+ /**
283
+ * @param $use_tm_editor
284
+ * @return int
285
+ */
286
+ public function force_woocommerce_native_editor_for_wcml_products_screen( $use_tm_editor ){
287
+
288
+ if( function_exists('get_current_screen') ) {
289
+ $current_screen = get_current_screen();
290
+ if ( $current_screen->id === 'woocommerce_page_wpml-wcml' ) {
291
+ $use_tm_editor = 1;
292
+ }
293
+ }
294
+
295
+ return $use_tm_editor;
296
+ }
297
+
298
+
299
+
300
  /**
301
  * Removes the translation editor links when the WooCommerce native products editor is used in WCML
302
  */
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.9
7
  Tested up to: 5.0.3
8
- Stable tag: 4.4.0
9
 
10
  Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
11
 
@@ -140,6 +140,15 @@ WooCommerce Multilingual is compatible with all major WooCommerce extensions. We
140
 
141
  == Changelog ==
142
 
 
 
 
 
 
 
 
 
 
143
  = 4.4.0 =
144
  * Added the ability to associate BACS accounts with currencies
145
  * Fix and removed duplicated entries in code
5
  License: GPLv2
6
  Requires at least: 3.9
7
  Tested up to: 5.0.3
8
+ Stable tag: 4.4.1
9
 
10
  Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
11
 
140
 
141
  == Changelog ==
142
 
143
+ = 4.4.1 =
144
+ * Fixed catalog visibility not updating
145
+ * Fix fatal error with Composite products
146
+ * Fix fatal error with Woocommerce Product Addons
147
+ * Removed options from WCML/Settings for handling Products translation since this can now be done with the post-switcher implemented in WPML 4.2.0
148
+ * Fix fatal error when bundle product is false
149
+ * Fix empty cart error with enabled option to clean cart when switching currency
150
+ * Fixed issue with trailing comma in product gallery handling
151
+
152
  = 4.4.0 =
153
  * Added the ability to associate BACS accounts with currencies
154
  * Fix and removed duplicated entries in code
templates/settings-ui.twig CHANGED
@@ -1,37 +1,38 @@
1
  <form method="post" action="{{ form.action }}">
2
 
3
- <div class="wcml-section">
4
- <div class="wcml-section-header">
5
- <h3>
6
- {{ form.translation_interface.heading }}
7
- <i class="otgs-ico-help wcml-tip" data-tip="{{ form.translation_interface.tip }}"></i>
8
- </h3>
9
- </div>
10
- <div class="wcml-section-content">
11
-
12
- <div id="wcml-translation-interface-dialog-confirm" title="{{ form.translation_interface.heading }}" class="hidden">
13
- <p>{{ form.translation_interface.pb_warning }}</p>
14
- <input type="hidden" class="ok-button" value="{{ form.translation_interface.pb_warning_ok_button }}" />
15
- <input type="hidden" class="cancel-button" value="{{ form.translation_interface.pb_warning_cancel_button }}"/>
16
  </div>
 
17
 
18
- <ul>
19
- <li>
20
- <input type="radio" name="trnsl_interface" value="{{ wpml_translation }}"
21
- {% if form.translation_interface.controls_value == wpml_translation %} checked="checked"{% endif %} id="wcml_trsl_interface_wcml" />
22
- <label for="wcml_trsl_interface_wcml">{{ form.translation_interface.wcml.label }}</label>
23
- </li>
24
- <li>
25
- <input type="radio" name="trnsl_interface" value="{{ native_translation }}"
26
- {% if form.translation_interface.controls_value == native_translation %} checked="checked"{% endif %} id="wcml_trsl_interface_native" />
27
- <label for="wcml_trsl_interface_native">{{ form.translation_interface.native.label|raw }}</label>
28
- </li>
29
- </ul>
30
 
31
- </div> <!-- .wcml-section-content -->
 
 
 
 
 
 
 
 
 
 
 
32
 
33
- </div> <!-- .wcml-section -->
34
 
 
 
35
  <div class="wcml-section">
36
 
37
  <div class="wcml-section-header">
1
  <form method="post" action="{{ form.action }}">
2
 
3
+ {% if form.translation_interface %}
4
+ <div class="wcml-section">
5
+ <div class="wcml-section-header">
6
+ <h3>
7
+ {{ form.translation_interface.heading }}
8
+ <i class="otgs-ico-help wcml-tip" data-tip="{{ form.translation_interface.tip }}"></i>
9
+ </h3>
 
 
 
 
 
 
10
  </div>
11
+ <div class="wcml-section-content">
12
 
13
+ <div id="wcml-translation-interface-dialog-confirm" title="{{ form.translation_interface.heading }}" class="hidden">
14
+ <p>{{ form.translation_interface.pb_warning }}</p>
15
+ <input type="hidden" class="ok-button" value="{{ form.translation_interface.pb_warning_ok_button }}" />
16
+ <input type="hidden" class="cancel-button" value="{{ form.translation_interface.pb_warning_cancel_button }}"/>
17
+ </div>
 
 
 
 
 
 
 
18
 
19
+ <ul>
20
+ <li>
21
+ <input type="radio" name="trnsl_interface" value="{{ wpml_translation }}"
22
+ {% if form.translation_interface.controls_value == wpml_translation %} checked="checked"{% endif %} id="wcml_trsl_interface_wcml" />
23
+ <label for="wcml_trsl_interface_wcml">{{ form.translation_interface.wcml.label }}</label>
24
+ </li>
25
+ <li>
26
+ <input type="radio" name="trnsl_interface" value="{{ native_translation }}"
27
+ {% if form.translation_interface.controls_value == native_translation %} checked="checked"{% endif %} id="wcml_trsl_interface_native" />
28
+ <label for="wcml_trsl_interface_native">{{ form.translation_interface.native.label|raw }}</label>
29
+ </li>
30
+ </ul>
31
 
32
+ </div> <!-- .wcml-section-content -->
33
 
34
+ </div> <!-- .wcml-section -->
35
+ {% endif %}
36
  <div class="wcml-section">
37
 
38
  <div class="wcml-section-header">
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit16830393fdb1b55f62e7d6c070d05751::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit6c2c5f8ed31c90f85bfe737e7731e4e7::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInitee5ac953817836c77c6305986630a01e::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInitdb2158ab35e86b1fa84892b29c037928::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit16830393fdb1b55f62e7d6c070d05751
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit16830393fdb1b55f62e7d6c070d05751
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit16830393fdb1b55f62e7d6c070d05751', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit16830393fdb1b55f62e7d6c070d05751', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit16830393fdb1b55f62e7d6c070d05751::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit16830393fdb1b55f62e7d6c070d05751
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit16830393fdb1b55f62e7d6c070d05751::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire16830393fdb1b55f62e7d6c070d05751($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire16830393fdb1b55f62e7d6c070d05751($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit6c2c5f8ed31c90f85bfe737e7731e4e7
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit6c2c5f8ed31c90f85bfe737e7731e4e7', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit6c2c5f8ed31c90f85bfe737e7731e4e7', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire6c2c5f8ed31c90f85bfe737e7731e4e7($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire6c2c5f8ed31c90f85bfe737e7731e4e7($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInitee5ac953817836c77c6305986630a01e {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitee5ac953817836c77c6305986630a01e {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitee5ac953817836c77c6305986630a01e', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitee5ac953817836c77c6305986630a01e', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInitdb2158ab35e86b1fa84892b29c037928 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitdb2158ab35e86b1fa84892b29c037928', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitdb2158ab35e86b1fa84892b29c037928', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit16830393fdb1b55f62e7d6c070d05751
8
  {
9
  public static $files = array (
10
  'b45b351e6b6f7487d819961fef2fda77' => __DIR__ . '/..' . '/jakeasmith/http_build_url/src/http_build_url.php',
@@ -238,10 +238,10 @@ class ComposerStaticInit16830393fdb1b55f62e7d6c070d05751
238
  public static function getInitializer(ClassLoader $loader)
239
  {
240
  return \Closure::bind(function () use ($loader) {
241
- $loader->prefixLengthsPsr4 = ComposerStaticInit16830393fdb1b55f62e7d6c070d05751::$prefixLengthsPsr4;
242
- $loader->prefixDirsPsr4 = ComposerStaticInit16830393fdb1b55f62e7d6c070d05751::$prefixDirsPsr4;
243
- $loader->prefixesPsr0 = ComposerStaticInit16830393fdb1b55f62e7d6c070d05751::$prefixesPsr0;
244
- $loader->classMap = ComposerStaticInit16830393fdb1b55f62e7d6c070d05751::$classMap;
245
 
246
  }, null, ClassLoader::class);
247
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7
8
  {
9
  public static $files = array (
10
  'b45b351e6b6f7487d819961fef2fda77' => __DIR__ . '/..' . '/jakeasmith/http_build_url/src/http_build_url.php',
238
  public static function getInitializer(ClassLoader $loader)
239
  {
240
  return \Closure::bind(function () use ($loader) {
241
+ $loader->prefixLengthsPsr4 = ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7::$prefixLengthsPsr4;
242
+ $loader->prefixDirsPsr4 = ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7::$prefixDirsPsr4;
243
+ $loader->prefixesPsr0 = ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7::$prefixesPsr0;
244
+ $loader->classMap = ComposerStaticInit6c2c5f8ed31c90f85bfe737e7731e4e7::$classMap;
245
 
246
  }, null, ClassLoader::class);
247
  }
wpml-woocommerce.php CHANGED
@@ -8,7 +8,7 @@
8
  Text Domain: woocommerce-multilingual
9
  Requires at least: 3.9
10
  Tested up to: 5.0.3
11
- Version: 4.4.0
12
  WC requires at least: 3.3.0
13
  WC tested up to: 3.5.4
14
  */
@@ -17,7 +17,7 @@ if ( defined( 'WCML_VERSION' ) ) {
17
  return;
18
  }
19
 
20
- define( 'WCML_VERSION', '4.4.0' );
21
  define( 'WCML_PLUGIN_PATH', dirname( __FILE__ ) );
22
  define( 'WCML_PLUGIN_FOLDER', basename( WCML_PLUGIN_PATH ) );
23
  define( 'WCML_LOCALE_PATH', WCML_PLUGIN_PATH . '/locale' );
8
  Text Domain: woocommerce-multilingual
9
  Requires at least: 3.9
10
  Tested up to: 5.0.3
11
+ Version: 4.4.1
12
  WC requires at least: 3.3.0
13
  WC tested up to: 3.5.4
14
  */
17
  return;
18
  }
19
 
20
+ define( 'WCML_VERSION', '4.4.1' );
21
  define( 'WCML_PLUGIN_PATH', dirname( __FILE__ ) );
22
  define( 'WCML_PLUGIN_FOLDER', basename( WCML_PLUGIN_PATH ) );
23
  define( 'WCML_LOCALE_PATH', WCML_PLUGIN_PATH . '/locale' );