Skip to content

Instantly share code, notes, and snippets.

View jonatanaxe's full-sized avatar
🐓
console.log('wololo');

Jonatan Machado jonatanaxe

🐓
console.log('wololo');
View GitHub Profile
@jonatanaxe
jonatanaxe / magento2-custom-script.php
Created June 22, 2020 20:24 — forked from missoxd/magento2-custom-script.php
Magento 2 custom script boilerplate
<?php
require __DIR__ . '/app/bootstrap.php';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$objectManager->get('\Magento\Framework\App\State')->setAreaCode('adminhtml');
$registry = $objectManager->get('\Magento\Framework\Registry');
$registry->register('isSecureArea', 'true');