After upgrading your Magento store to 2.4.6, you may encounter the following message: Class “Zend_Json” not found in <...>. The problem is that using certain Zend classes is no longer supported in Magento 2.4.6. Replace Zend_Json with the following code:
|
1 |
\Laminas\Json\Json |
Replace every occurrence of \Zend_Json with \Laminas\Json\Json to resolve the issue. Make sure that the laminas/laminas-serializer library is installed.
Example:
|
1 |
return \Zend_Json::encode($jsonArray); |
becomes
|
1 |
return \Laminas\Json\Json::encode($jsonArray); |
Fixing Class Zend_Json not found in Magento 2.4.6
Need help implementing this solution, or still looking for a fix to your Magento problem? Get in touch and I will be happy to help with your project.