Skip to main content

Try This :-

eavSetupFactory = $eavSetupFactory;    }    public function uninstall(\Magento\Framework\Setup\SchemaSetupInterface $setup, \Magento\Framework\Setup\ModuleContextInterface $context)    {    $setup->startSetup();    $eavSetup = $this->eavSetupFactory->create();    $entityTypeId = 1; // Attributte Id    $eavSetup->removeAttribute($entityTypeId, 'attribute_code');    $setup->endSetup(); } }    }   

Try This :-

eavSetupFactory = $eavSetupFactory;  }  public function uninstall(\Magento\Framework\Setup\SchemaSetupInterface $setup, \Magento\Framework\Setup\ModuleContextInterface $context)  {  $setup->startSetup();  $eavSetup = $this->eavSetupFactory->create();  $entityTypeId = 1; // Attributte Id  $eavSetup->removeAttribute($entityTypeId, 'attribute_code');  $setup->endSetup(); } }  }  

Try This :-

eavSetupFactory = $eavSetupFactory;  }  public function uninstall(\Magento\Framework\Setup\SchemaSetupInterface $setup, \Magento\Framework\Setup\ModuleContextInterface $context)  {  $setup->startSetup();  $eavSetup = $this->eavSetupFactory->create();  $entityTypeId = 1; // Attributte Id  $eavSetup->removeAttribute($entityTypeId, 'attribute_code');  $setup->endSetup(); }  } 
Source Link
user68317
user68317

Try This :-

eavSetupFactory = $eavSetupFactory; } public function uninstall(\Magento\Framework\Setup\SchemaSetupInterface $setup, \Magento\Framework\Setup\ModuleContextInterface $context) { $setup->startSetup(); $eavSetup = $this->eavSetupFactory->create(); $entityTypeId = 1; // Attributte Id $eavSetup->removeAttribute($entityTypeId, 'attribute_code'); $setup->endSetup(); } } }