Skip to content

Commit

Permalink
re #2 - handle empty address for virtual products
Browse files Browse the repository at this point in the history
  • Loading branch information
bnayalivne committed Sep 5, 2019
1 parent 3b1d775 commit f446858
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Serializer/AddressSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public function __construct(
* @return array
*/
public function serialize($address){
if(is_null($address)){
return null;
}
$countryCode = $address->getCountryId();
$countryName = null;
if(!empty($countryCode)){
Expand Down

0 comments on commit f446858

Please sign in to comment.