Created
February 19, 2021 18:31
-
-
Save WallasFaria/032ebbfd857e7f1750d0401598daf859 to your computer and use it in GitHub Desktop.
Magento: Debugger via console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# cd /path/to/magento | |
# php -a | |
require 'pub/index.php'; | |
$entityId = 374; | |
$order = \Magento\Framework\App\ObjectManager::getInstance() | |
->get('Magento\Sales\Model\OrderRepository') | |
->get($entityId); | |
$order->setState('processing')->setStatus('processing')->save(); | |
echo $order->getStatus(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# cd /path/to/magento | |
# php -a | |
require 'pub/index.php'; | |
$logger = \Magento\Framework\App\ObjectManager::getInstance() | |
->get('Psr\Log\LoggerInterface'); | |
# example | |
$cron = new MestreMage\PagarMe\Cron\Cronjob($logger); | |
$cron->execute(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment