I want to get a config value from core_config but the default level I know we can get it by using scope config but I want default

protected $_scopeConfig;

    public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig) {
        $this->_scopeConfig = $scopeConfig;
$this->scopeConfig->getValue('example_section/general/field_data', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);

When you give SCOPE_STORE it will give you default value

  • Thank you I will take a look at this and test it out – Jack Brooks Sep 25 '19 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.