We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    1. Create InstallData.php at the following path and paste the below code.

    appcodeMagemonkeysRemoveAttributeSetupInstallData.php

    <?php
     namespace MagemonkeysRemoveAttributeSetup;
    
     use MagentoEavSetupEavSetup;
     use MagentoEavSetupEavSetupFactory;
     use MagentoFrameworkSetupInstallDataInterface;
     use MagentoFrameworkSetupModuleContextInterface;
     use MagentoFrameworkSetupModuleDataSetupInterface;
    
    class InstallData implements InstallDataInterface
     {
         private $eavSetupFactory;
    
         public function __construct(EavSetupFactory $eavSetupFactory) 
         {
             $this->eavSetupFactory = $eavSetupFactory;
         }
     
         public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
         {
             $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
             $eavSetup->removeAttribute(MagentoCatalogModelProduct::ENTITY,
             'custom_attribute_id');
         }
     } ?>

     

    2. Refresh the cache and deploy the static content command.

    php bin/magento setup:upgrade
    
    php bin/magento setup:static-content:deploy -f
    
    php bin/magento cache:flush

     

    field_5bfb909c5ccae

      Get a Free Quote