24 public function adjustLocation(
Location $location): void
38 if (isset($info[
'country']))
40 $this->adjustLocationField($locationFieldCollection, Type::COUNTRY, $info[
'country']);
42 if (isset($info[
'state']))
44 $this->adjustLocationField($locationFieldCollection, Type::ADM_LEVEL_1, $info[
'state']);
54 $addressFieldCollection = $address->getFieldCollection();
56 if (isset($info[
'country']))
58 $this->adjustAddressField(
59 $addressFieldCollection,
60 Entity\Address\FieldType::COUNTRY,
65 if (isset($info[
'state']))
67 $this->adjustAddressField(
68 $addressFieldCollection,
69 Entity\Address\FieldType::ADM_LEVEL_1,
94 unset($item[
'countrycode']);
95 unset($item[
'postcode']);
97 if (isset($info[
'country']))
99 $item[
'country'] = $info[
'country'];
102 if (isset($info[
'state']))
104 $item[
'state'] = $info[
'state'];
121 $item = $fieldCollection->getItemByType($type);
124 $item->setValue($value);
139 $item = $fieldCollection->getItemByType($type);
142 $item->setValue($value);