You have to retrieve the good config path and use this method : https://magento.stackexchange.com/a/78473/33619
/**
* @var \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
*/
private $scopeConfig;
/**
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
*/
public function __construct(
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
) {
$this->scopeConfig = $scopeConfig;
}
/**
* @return float
*/
public function getFreeShippingSubtotal()
{
return $this->scopeConfig->getValue('carriers/freeshipping/free_shipping_subtotal', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
}
We need to call the default method available.
Just Use \Magento\Framework\App\Config\ScopeConfigInterface
$scopeConfig, In your constructor argument and set the class property:
$this->scopeConfig = $scopeConfig;
Now to Get the configuration value just use
$this->scopeConfig->getValue('dev/debug/template_hints',
\Magento\Store\Model\ScopeInterface::SCOPE_STORE);