Version Description
- Bug fix: minimum required amount was not calculated correctly for secondary currencies (not included in the previous version)
Download this release
Release Info
Developer | mihaimihai |
Plugin | WooCommerce Multilingual – run WooCommerce with WPML |
Version | 3.8.4 |
Comparing to | |
See all releases |
Code changes from version 3.8.3 to 3.8.4
- inc/currencies/class-wcml-multi-currency-shipping.php +12 -6
- readme.txt +4 -1
- wpml-woocommerce.php +2 -2
inc/currencies/class-wcml-multi-currency-shipping.php
CHANGED
@@ -9,16 +9,17 @@ class WCML_Multi_Currency_Shipping{
|
|
9 |
|
10 |
$this->multi_currency =& $multi_currency;
|
11 |
|
12 |
-
$rates = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}woocommerce_shipping_zone_methods WHERE method_id IN('flat_rate', 'local_pickup')" );
|
13 |
foreach( $rates as $method ){
|
14 |
$option_name = sprintf('woocommerce_%s_%d_settings', $method->method_id, $method->instance_id );
|
15 |
add_filter('option_' . $option_name, array($this, 'convert_shipping_cost'));
|
16 |
}
|
17 |
|
18 |
-
add_filter( 'wcml_shipping_price_amount', array($this, 'shipping_price_filter') ); // WCML filters
|
19 |
-
add_filter( 'wcml_shipping_free_min_amount', array($this, 'shipping_free_min_amount') ); // WCML filters
|
20 |
|
21 |
-
|
|
|
22 |
|
23 |
}
|
24 |
|
@@ -28,6 +29,10 @@ class WCML_Multi_Currency_Shipping{
|
|
28 |
$settings['cost'] = $this->multi_currency->prices->raw_price_filter($settings['cost'], $this->multi_currency->get_client_currency());
|
29 |
}
|
30 |
|
|
|
|
|
|
|
|
|
31 |
return $settings;
|
32 |
}
|
33 |
|
@@ -47,10 +52,11 @@ class WCML_Multi_Currency_Shipping{
|
|
47 |
|
48 |
}
|
49 |
|
|
|
50 |
public function adjust_min_amount_required($options){
|
51 |
|
52 |
-
if(!empty($options['min_amount'])){
|
53 |
-
$options['min_amount'] = apply_filters('wcml_shipping_free_min_amount', $options['min_amount']);
|
54 |
}
|
55 |
|
56 |
return $options;
|
9 |
|
10 |
$this->multi_currency =& $multi_currency;
|
11 |
|
12 |
+
$rates = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}woocommerce_shipping_zone_methods WHERE method_id IN('flat_rate', 'local_pickup', 'free_shipping')" );
|
13 |
foreach( $rates as $method ){
|
14 |
$option_name = sprintf('woocommerce_%s_%d_settings', $method->method_id, $method->instance_id );
|
15 |
add_filter('option_' . $option_name, array($this, 'convert_shipping_cost'));
|
16 |
}
|
17 |
|
18 |
+
add_filter( 'wcml_shipping_price_amount', array( $this, 'shipping_price_filter' ) ); // WCML filters
|
19 |
+
add_filter( 'wcml_shipping_free_min_amount', array( $this, 'shipping_free_min_amount') ); // WCML filters
|
20 |
|
21 |
+
// Before WooCommerce 2.6
|
22 |
+
add_filter('option_woocommerce_free_shipping_settings', array( $this, 'adjust_min_amount_required' ) );
|
23 |
|
24 |
}
|
25 |
|
29 |
$settings['cost'] = $this->multi_currency->prices->raw_price_filter($settings['cost'], $this->multi_currency->get_client_currency());
|
30 |
}
|
31 |
|
32 |
+
if( !empty( $settings['requires'] ) && $settings['requires'] == 'min_amount' ){
|
33 |
+
$settings['min_amount'] = apply_filters( 'wcml_shipping_free_min_amount', $settings['min_amount'] );
|
34 |
+
}
|
35 |
+
|
36 |
return $settings;
|
37 |
}
|
38 |
|
52 |
|
53 |
}
|
54 |
|
55 |
+
// Before WooCommerce 2.6
|
56 |
public function adjust_min_amount_required($options){
|
57 |
|
58 |
+
if( !empty( $options['min_amount'] ) ){
|
59 |
+
$options['min_amount'] = apply_filters( 'wcml_shipping_free_min_amount', $options['min_amount'] );
|
60 |
}
|
61 |
|
62 |
return $options;
|
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: 4.5.3
|
8 |
-
Stable tag: 3.8.
|
9 |
|
10 |
Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
|
11 |
|
@@ -131,6 +131,9 @@ WooCommerce Multilingual is compatible with all major WooCommerce extensions. We
|
|
131 |
|
132 |
== Changelog ==
|
133 |
|
|
|
|
|
|
|
134 |
= 3.8.3 =
|
135 |
* Added improvements to the Translation Editor for translating custom fields for products and variations
|
136 |
* Added access for translator subscribers to translate content
|
5 |
License: GPLv2
|
6 |
Requires at least: 3.9
|
7 |
Tested up to: 4.5.3
|
8 |
+
Stable tag: 3.8.4
|
9 |
|
10 |
Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
|
11 |
|
131 |
|
132 |
== Changelog ==
|
133 |
|
134 |
+
= 3.8.4 =
|
135 |
+
* Bug fix: minimum required amount was not calculated correctly for secondary currencies (not included in the previous version)
|
136 |
+
|
137 |
= 3.8.3 =
|
138 |
* Added improvements to the Translation Editor for translating custom fields for products and variations
|
139 |
* Added access for translator subscribers to translate content
|
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.8.
|
10 |
*/
|
11 |
|
12 |
if( defined( 'WCML_VERSION' ) ) return;
|
13 |
|
14 |
-
define( 'WCML_VERSION', '3.8.
|
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.8.4
|
10 |
*/
|
11 |
|
12 |
if( defined( 'WCML_VERSION' ) ) return;
|
13 |
|
14 |
+
define( 'WCML_VERSION', '3.8.4' );
|
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' );
|