Skip to content

Commit

Permalink
fix: switch address fields
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiano-mallmann committed Jul 31, 2023
1 parent 3f9ccec commit 0bf3b8c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ public function getCustomerAddressNumber($shipping)
public function getCustomerAddressComplement($shipping)
{
if ($shipping) {
return !$this->getShippingAddressAttribute($this->getConfig()->getCustomerAddressComplement()) ? 'street_4' : $this->getConfig()->getCustomerAddressComplement();
return !$this->getShippingAddressAttribute($this->getConfig()->getCustomerAddressComplement()) ? 'street_3' : $this->getConfig()->getCustomerAddressComplement();
}

return !$this->getBillingAddressAttribute($this->getConfig()->getCustomerAddressComplement()) ? 'street_4' : $this->getConfig()->getCustomerAddressComplement();
return !$this->getBillingAddressAttribute($this->getConfig()->getCustomerAddressComplement()) ? 'street_3' : $this->getConfig()->getCustomerAddressComplement();
}

/**
Expand All @@ -51,10 +51,10 @@ public function getCustomerAddressComplement($shipping)
public function getCustomerAddressDistrict($shipping)
{
if ($shipping) {
$streetLine = !$this->getShippingAddressAttribute($this->getConfig()->getCustomerAddressDistrict()) ? 'street_3' : $this->getConfig()->getCustomerAddressDistrict();
$streetLine = !$this->getShippingAddressAttribute($this->getConfig()->getCustomerAddressDistrict()) ? 'street_4' : $this->getConfig()->getCustomerAddressDistrict();
return $this->getShippingAddressAttribute($streetLine);
}
$streetLine = !$this->getBillingAddressAttribute($this->getConfig()->getCustomerAddressDistrict()) ? 'street_3' : $this->getConfig()->getCustomerAddressDistrict();
$streetLine = !$this->getBillingAddressAttribute($this->getConfig()->getCustomerAddressDistrict()) ? 'street_4' : $this->getConfig()->getCustomerAddressDistrict();
return $this->getBillingAddressAttribute($streetLine);
}

Expand Down

0 comments on commit 0bf3b8c

Please sign in to comment.