Skip to content

Commit

Permalink
fix: admin user edit save (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
mateus-picoloto authored Dec 19, 2023
1 parent 0cf91ec commit 33bf9e4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Concrete/Magento2PlatformCustomerDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ public function getPagarmeId()
return $this->pagarmeId;
}

/** @var $mpIdLegado deprecated */
$mpIdLegado = $this->platformCustomer->getCustomAttribute('customer_id_pagarme');
if (!empty($mpIdLegado->getValue())) {
$this->pagarmeId = $mpIdLegado;
/** @var $pagarmeIdLegacy deprecated */
$pagarmeIdLegacy = $this->platformCustomer->getCustomAttribute('customer_id_pagarme');
$isPagarmeIdLegacyValid = !empty($pagarmeIdLegacy)
&& is_object($pagarmeIdLegacy)
&& !empty($pagarmeIdLegacy->getValue());
if ($isPagarmeIdLegacyValid) {
$this->pagarmeId = $pagarmeIdLegacy;
return $this->pagarmeId;
}

Expand Down Expand Up @@ -88,7 +91,7 @@ public function getAddress()
public function getPhones()
{
$customerToArray = $this->platformCustomer->__toArray();
return $customerToArray["phones"];
return $customerToArray["phones"];
}

}

0 comments on commit 33bf9e4

Please sign in to comment.