Last night I updated our 3rd party payment module, when I did this I got an error under setup:upgrade called "area code is not set". Apparently, this was a Magento 2.4.3 bug and I used this to fix the bug: https://github.com/magento/magento2/commit/d0f220111548123a7a77102cc516b1043d54d905
But after this, we get a new error when we try and print packing slips: Notice: Undefined variable: layoutFactory in /chroot/home/xxxxx/xxxxxxxx/html/vendor/magento/module-payment/Helper/Data.php on line 180
Here is the code i did:
{ $layout = $layout ?: $layoutFactory->create(); $blockType = $info->getMethodInstance()->getInfoBlockType(); $block = $layout->createBlock($blockType); $block->setInfo($info); return $block; } Does anyone know what is wrong?