0

I'm upgrading from Magento 2.1.7 to Magento 2.2.7 and PHP 7.1, When I run " php bin/magento setup:di:compile" it stops at 1/7 and I get the following error:

PHP Fatal error: Class 'Magento\SalesRule\Observer\SalesOrderAfterPlaceObserver' not found in /home/xxxxxxx/public_html/app/code/Amasty/Promo/Observer/FixCouponsUsageObserver.php on line 19

I'm using the following Amasty versions: amasty/module-special-promo: "2.2.1", amasty/promo: "1.4.0", amasty/base: 1.4.10

As a result of this I'm getting the following error when checking out:

code 500 message Fatal Error: 'Class 'Magento\SalesRule\Observer\SalesOrderAfterPlaceObserver' not found' in '/home/mthabisi/projects/oliversweeney/vendor/amasty/promo/Observer/FixCouponsUsageObserver.php' on line 19

Naresh
  • 16,698
  • 6
  • 112
  • 113
Mtb
  • 17
  • 5

1 Answers1

0

When I have this type of error I follow those steps:

1 : Delete de var/di and var/generation folders and recompile.

2 : Check if the class "Magento\SalesRule\Observer\SalesOrderAfterPlaceObserver" Still exist. It could have been deleted or renamed in versions higher than 2.1.7

3 : If the class does not exist, update your plugin. The version of amasty you are using might only works with version prior to 2.2