I want to delete all the address associated with the customer in the Magento(billing and shipping address). How can i do this programatically? Can somebody help me out?
I am using this code:
$customer = Mage::getModel('customer/customer');
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->loadByEmail((string) $_REQUEST['email']);
$address = Mage::getModel('customer/address');
$address->delete();