v1.2.5: How to fix incompatible issue with M2.4.1?

Created by Jane D, Modified on Tue, 17 Nov, 2020 at 11:03 AM by Jane D

QUESTION:


We are running you Bss_CheckoutCustomField module v1.2.5 on our Magento 2.4.1 store.

 

We are getting the following error on setup:di:compile:

Errors during compilation:

 Bss\CheckoutCustomField\Model\Plugin\Sales\Order\Pdf\Shipment

  Incompatible argument type: Required type: \Magento\Store\Model\App\Emulation. Actual type: \Magento\Framework\Locale\ResolverInterface; File:

/microcloud/domains/refini/domains/refinishing-consumables.co.uk/http/app/code/Bss/CheckoutCustomField/Model/Plugin/Sales/Order/Pdf/Shipment.php

 

 Bss\CheckoutCustomField\Model\Plugin\Sales\Order\Pdf\Invoice

  Incompatible argument type: Required type: \Magento\Store\Model\App\Emulation. Actual type: \Magento\Framework\Locale\ResolverInterface; File:

/microcloud/domains/refini/domains/refinishing-consumables.co.uk/http/app/code/Bss/CheckoutCustomField/Model/Plugin/Sales/Order/Pdf/Invoice.php

 Bss\CheckoutCustomField\Model\Plugin\Sales\Order\Pdf\Creditmemo

  Incompatible argument type: Required type: \Magento\Store\Model\App\Emulation. Actual type: \Magento\Framework\Locale\ResolverInterface; File:

/microcloud/domains/refini/domains/refinishing-consumables.co.uk/http/app/code/Bss/CheckoutCustomField/Model/Plugin/Sales/Order/Pdf/Creditmemo.php


Please tell us how to fix it?


ANSWER:


To fix the incompatible issue with M2.4.1, please edit the files as below:

  • + Model/Plugin/Sales/Order/Pdf/Creditmemo.php


+ Model/Plugin/Sales/Order/Pdf/Invoice.php


+ Model/Plugin/Sales/Order/Pdf/Shipment.php


Or download the attached files below and overwrite the current files on your site.


If you have any other question or concern, please feel free to contact us. We'd be happy to support!

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