I want to add "laba cena" (attribute) in catalog price rule dropdown I am using data patch but its not working
any tips?
now using
<?php
namespace Devall\SpecialPrice\Setup\Patch\Data;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Eav\Setup\EavSetup;
class AddLabaCenaAttribute implements DataPatchInterface
{
protected $eavSetupFactory;
public function __construct( EavSetup $eavSetupFactory)
{
$this->eavSetupFactory = $eavSetupFactory;
}
/**
* @inheritDoc
*/
public static function getDependencies()
{
return [];
}
/**
* @inheritDoc
*/
public function getAliases()
{
return [];
}
/**
* @inheritDoc
*/
public function apply()
{
$this->eavSetupFactory->updateAttribute(4,184,'is_used_for_promo_rules',1,null);
}
}`
still no success .