@@ -1210,16 +1210,18 @@ |
||
| 1210 | 1210 | |
| 1211 | 1211 | if ( !empty( $tax_rates ) ) { |
| 1212 | 1212 | foreach ( $tax_rates as $key => $tax_rate ) { |
| 1213 | - if ( $country != $tax_rate['country'] ) |
|
| 1214 | - continue; |
|
| 1213 | + if ( $country != $tax_rate['country'] ) { |
|
| 1214 | + continue; |
|
| 1215 | + } |
|
| 1215 | 1216 | |
| 1216 | 1217 | if ( !empty( $tax_rate['global'] ) ) { |
| 1217 | 1218 | if ( 0 !== $tax_rate['rate'] || !empty( $tax_rate['rate'] ) ) { |
| 1218 | 1219 | $rate = number_format( $tax_rate['rate'], 4 ); |
| 1219 | 1220 | } |
| 1220 | 1221 | } else { |
| 1221 | - if ( empty( $tax_rate['state'] ) || strtolower( $state ) != strtolower( $tax_rate['state'] ) ) |
|
| 1222 | - continue; |
|
| 1222 | + if ( empty( $tax_rate['state'] ) || strtolower( $state ) != strtolower( $tax_rate['state'] ) ) { |
|
| 1223 | + continue; |
|
| 1224 | + } |
|
| 1223 | 1225 | |
| 1224 | 1226 | $state_rate = $tax_rate['rate']; |
| 1225 | 1227 | if ( 0 !== $state_rate || !empty( $state_rate ) ) { |