Incompatibility with M2.1.x

Created by Support Agent, Modified on Mon, 13 Apr at 1:48 AM by Support Agent

Issue:

When checkout, I got the error:

Fatal error: Uncaught Error: Call to undefined method Magento\Sales\Api\Data\OrderExtension::setBssCustomfield() in /var/www/html/app/code/Bss/CheckoutCustomField/Model/Observer/Sales/OrderLoadAfter.php:75 Stack trace: #0 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Bss\CheckoutCustomField\Model\Observer\Sales\OrderLoadAfter->execute(Object(Magento\Framework\Event\Observer)) #1 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Bss\CheckoutCustomField\Model\Observer\Sales\OrderLoadAfter), Object(Magento\Framework\Event\Observer)) #2 /var/www/html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer)) #3 /var/www/html/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('sales_order_loa...', Array) #4 /var/www/html/vendor/magento/framework/Model in /var/www/html/app/code/Bss/CheckoutCustomField/Model/Observer/Sales/OrderLoadAfter.php on line 75


Solution:  

Could you please remove 2 folders: var/di and var/generation, then flush cache to fix the issue?

If there is any problem, please let us know. 


Learn more about us!!


BSS Commerce is a trusted Magento 2 extensions provider with 14+ years of experience, serving 75,000+ customers worldwide. We are an Adobe Commerce Solution Bronze Partner and a Select Magento Extensions Builder, reinforcing our expertise in the Magento ecosystem.


We specialize in developing 150+ high-quality Magento 2 extensions that enhance functionality, improve user experience, and support scalable growth. Our reputation is built on long-term partnerships, positive feedback, and proven performance-driven solutions.


Please visit our site for more useful Magento 2 Extensions: https://bsscommerce.com/magento-2-extensions.html


Get our extensions now:


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article