Answers for "magento 2 test script"

0

magento 2 test script

use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);

$obj = $bootstrap->getObjectManager();

$state = $obj->get(Magento\Framework\App\State::class);
$state->setAreaCode('frontend');
Posted by: Guest on April-26-2022

Browse Popular Code Answers by Language