fix tax saving
This commit is contained in:
parent
e1970c497b
commit
487d749a03
|
@ -471,10 +471,12 @@ function woocommerce_tax_rates_setting_save() {
|
|||
|
||||
if ( is_numeric( $postcode_parts[0] ) && is_numeric( $postcode_parts[1] ) && $postcode_parts[1] > $postcode_parts[0] ) {
|
||||
for ( $i = $postcode_parts[0]; $i <= $postcode_parts[1]; $i ++ ) {
|
||||
if ( $i )
|
||||
$postcode_query[] = "( '$i', $tax_rate_id, 'postcode' )";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( $postcode )
|
||||
$postcode_query[] = "( '$postcode', $tax_rate_id, 'postcode' )";
|
||||
}
|
||||
|
||||
|
@ -491,6 +493,7 @@ function woocommerce_tax_rates_setting_save() {
|
|||
$cities = explode( ';', $city );
|
||||
$cities = array_map( 'strtoupper', array_map( 'woocommerce_clean', $cities ) );
|
||||
foreach( $cities as $city ) {
|
||||
if ( $city ) {
|
||||
$wpdb->insert(
|
||||
$wpdb->prefix . "woocommerce_tax_rate_locations",
|
||||
array(
|
||||
|
@ -501,6 +504,7 @@ function woocommerce_tax_rates_setting_save() {
|
|||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue