Skip to content

Commit

Permalink
fix: admin user edit save (#288)
Browse files Browse the repository at this point in the history
* fix: remove call to newer magento versions functionalities

* fix: admin user edit save (#287)
  • Loading branch information
mateus-picoloto authored Dec 19, 2023
1 parent d82de24 commit 584dd3c
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 584dd3c

Please sign in to comment.