/** * Check whether specified address should be processed in after_save event handler * * @param Mage_Customer_Model_Address $address * @return bool */ protected function _canProcessAddress($address) { if ($address->getForceProcess()) { return true; } if (Mage::registry(self::VIV_CURRENTLY_SAVED_ADDRESS) != $address->getId()) { return false; } $configAddressType = Mage::helper('customer/address')->getTaxCalculationAddressType(); if ($configAddressType == Mage_Customer_Model_Address_Abstract::TYPE_SHIPPING) { return $this->_isDefaultShipping($address); } return $this->_isDefaultBilling($address); }