I have a Magento shop, How can I add a store config data programmatically
Here is a sample code you can have a look to add a store config data to your Magento store.
$configData = [ 'section' => 'YOUR_SECTION', 'website' => null, 'store' => null, 'groups' => [ 'YOUR_GROUP' => [ 'fields' => [ 'YOUR_FIELD' => [ 'value' => $yourValue, ], ], ], ], ]; $configFactory = \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\Config\Model\Config\Factory'); $configModel = $configFactory->create(['data' => $configData]); $configModel->save();