moduleDataSetup = $moduleDataSetup; $this->taxSetupFactory = $taxSetupFactory; } /** * {@inheritdoc} */ public function apply() { /** @var TaxSetup $taxSetup */ $taxSetup = $this->taxSetupFactory->create(['resourceName' => 'tax_setup', 'setup' => $this->moduleDataSetup]); $this->moduleDataSetup->getConnection()->startSetup(); //Update the tax_class_id attribute in the 'catalog_eav_attribute' table $taxSetup->updateAttribute( \Magento\Catalog\Model\Product::ENTITY, 'tax_class_id', 'is_visible_in_advanced_search', false ); $this->moduleDataSetup->getConnection()->endSetup(); } /** * {@inheritdoc} */ public static function getDependencies() { return [ AddTaxAttributeAndTaxClasses::class ]; } /** * {@inheritdoc} */ public static function getVersion() { return '2.0.1'; } /** * {@inheritdoc} */ public function getAliases() { return []; } }