Skip to content

Commit

Permalink
Fix/load street in small villages (#63)
Browse files Browse the repository at this point in the history
* use the city district if no street available

* update readme
  • Loading branch information
vyskoczilova committed Aug 2, 2023
1 parent cf47edd commit 1d19f04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion includes/ares.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ function woolab_icdic_ares( $ico = NULL ) {
$cp_2 = $data->AA->CO->__toString();
$cp = ( $cp_2 != "" ? $cp_1."/".$cp_2 : $cp_1 );
$cp = (empty($cp)?$data->AA->CA->__toString():$cp);
$return['adresa'] = $data->AA->NU->__toString() . ' ' . $cp;

$street = $data->AA->NU->__toString() ? $data->AA->NU->__toString() : $data->AA->NCO->__toString();
$return['adresa'] = $street . ' ' . $cp;

$return['psc'] = $data->AA->PSC->__toString();
$return['mesto'] = $data->AA->N->__toString();
Expand Down
5 changes: 3 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ Either post it on [GitHub](https://github.com/vyskoczilova/kybernaut-ic-dic) or

= 1.7.2 (2023-08-02) =

* Fix: non HPOS WooCommerce edit order - load IC DIC values
* Several code updates and cleanup.
* Fix: non HPOS WooCommerce edit order - load IC DIC values [#60](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/60)
* Fix: ICO - load the city district (NCO) if the street (NO) is not filled in (case when the street = city name) [#62](https://github.com/vyskoczilova/kybernaut-ic-dic/issues/62)
* Several code updates and cleanup [#61](https://github.com/vyskoczilova/kybernaut-ic-dic/pull/61)

= 1.7.1 (2023-07-26) =

Expand Down

0 comments on commit 1d19f04

Please sign in to comment.