Skip to content

Magento 2 Plugin After Execute Controller

I have an existing controller that returns a JSON. public function execute() { $customer = $this->_customerModel->getById(175); $resultJson = $this->resultFactory->create(MagentoFrameworkControllerResultFactory::TYPE_JSON); $resultJson->setData( [ ‘status’ => ‘ok’, ‘message’ => ‘Success.’, ‘data’ => $customer->__toArray() ] ); return $resultJson; } I have created afterExecute() plugin,… Read More »Magento 2 Plugin After Execute Controller

Fail to setup:upgrade and setup:di:compile after upgrading to 2.4.7 and 2.4.7-p3

I’ve tried everything from upgrading all modules, give right permissions, removing generated folder, dumping composer, nothing works and I can’t setup:upgrade or setup:di:compile. Please help, thanks in advance php bin/magento setup:upgrade Cache types config flushed successfully Cache cleared successfully File… Read More »Fail to setup:upgrade and setup:di:compile after upgrading to 2.4.7 and 2.4.7-p3