<?php
namespace VendorExtensionSetup;
use MagentoFrameworkModuleSetupMigration;
use MagentoFrameworkSetupInstallDataInterface;
use MagentoFrameworkSetupModuleContextInterface;
use MagentoFrameworkSetupModuleDataSetupInterface;
use MagentoCustomerModelGroupFactory;
class InstallData implements InstallDataInterface
{
protected $groupFactory;
public function __construct(GroupFactory $groupFactory) {
$this->groupFactory = $groupFactory;
}
public function install(
ModuleDataSetupInterface $setup,
ModuleContextInterface $context
) {
$setup->startSetup();
$group = $this->groupFactory->create();
$group
->setCode('New Group')
->setTaxClassId(3)
->save();
$setup->endSetup();
}
}