Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
product_attribute.php
Go to the documentation of this file.
1 <?php
9  ->create(\Magento\Catalog\Model\ResourceModel\Eav\Attribute::class);
10 $attribute->setAttributeCode('test_attribute_code_333')
11  ->setEntityTypeId(4)
12  ->setIsGlobal(1)
13  ->setPrice(95);
14 $attribute->save();
$attribute