Created
December 2, 2016 17:19
-
-
Save gelanivishal/cd51d328aa0da9c19ffc7859af5cfa0a to your computer and use it in GitHub Desktop.
Delete customer attribute script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL | E_STRICT); | |
$mageFilename = 'app/Mage.php'; | |
require_once $mageFilename; | |
Mage::setIsDeveloperMode(true); | |
umask(0); | |
Mage::app(); | |
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID)); | |
$setup = new Mage_Eav_Model_Entity_Setup('core_setup'); | |
try { | |
$custAttr = 'accountspayable_email'; // here enter your attribute name which you want to remove | |
$setup->removeAttribute('customer', $custAttr); | |
echo $custAttr." attribute is removed"; | |
} | |
catch (Mage_Core_Exception $e) { | |
$this->_fault('data_invalid', $e->getMessage()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment