moduleDataSetup = $moduleDataSetup; $this->eavSetupFactory = $eavSetupFactory; } /** * {@inheritdoc} */ public function apply() { /** @var EavSetup $eavSetup */ $eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]); $relatedProductTypes = explode( ',', $eavSetup->getAttribute(\Magento\Catalog\Model\Product::ENTITY, 'tier_price', 'apply_to') ); $key = array_search(Configurable::TYPE_CODE, $relatedProductTypes); if ($key !== false) { unset($relatedProductTypes[$key]); $eavSetup->updateAttribute( \Magento\Catalog\Model\Product::ENTITY, 'tier_price', 'apply_to', implode(',', $relatedProductTypes) ); } } /** * {@inheritdoc} */ public static function getDependencies() { return [ InstallInitialConfigurableAttributes::class, ]; } /** * {@inheritdoc}\ */ public static function getVersion() { return '2.2.0'; } /** * {@inheritdoc} */ public function getAliases() { return []; } }