this code, witch disable of activate tablerate, was working in magento 2.2.7, afther update to 2.3 the code still works in developer mode but afhter di/compile it give me this error : Class setAreaCode does not exist
this is the code someone has any idea to resolve this?
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/../../../../../app/bootstrap.php';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$objectManager->get(\Magento\Framework\App\State::class)->setAreaCode('adminhtml');
$objectManager->create('\Magento\Framework\App\Config\Storage\WriterInterface')->save('carriers/tablerate/active', 1, 'default', 0);
$objectManager->create('\Magento\Framework\App\Config\Storage\WriterInterface')->save('carriers/tablerate/active', 1, 'websites', 1);