diff --git a/Observer/AdminCustomerBeforeSave.php b/Observer/AdminCustomerBeforeSave.php index 1b3ce45b..4725d871 100644 --- a/Observer/AdminCustomerBeforeSave.php +++ b/Observer/AdminCustomerBeforeSave.php @@ -46,6 +46,10 @@ public function execute(EventObserver $observer) $event = $observer->getEvent(); $platformCustomer = new Magento2PlatformCustomerDecorator($event->getCustomer()); + if (empty($platformCustomer->getPagarmeId())) { + return $this; + } + $customerService = new CustomerService(); try { $customerService->updateCustomerAtPagarme($platformCustomer);