getIsCustomerSaveTransaction() && $this->isAddressDefault($entity) ) { return true; } return $result; } /** * Checks if address has chosen as default and has had an id * * @param DataObject $entity * @return bool */ private function isAddressDefault(DataObject $entity) { return $entity->getId() && ($entity->getIsDefaultBilling() || $entity->getIsDefaultShipping()); } }