/** * Check whether specified address should be processed in after_save event handler * * @param Address $address * @return bool */ protected function _canProcessAddress($address) { if ($address->getForceProcess()) { return true; } if ($this->_coreRegistry->registry(BeforeAddressSaveObserver::VIV_CURRENTLY_SAVED_ADDRESS) != $address->getId()) { return false; } $configAddressType = $this->_customerAddress->getTaxCalculationAddressType(); if ($configAddressType == AbstractAddress::TYPE_SHIPPING) { return $this->_isDefaultShipping($address); } return $this->_isDefaultBilling($address); }