1

Webkul\Marketplace\Model\Order\Pdf\Creditmemo Incompatible argument type: Required type: \Magento\Store\Model\App\Emulation. Actual type: \Magento\Framework\Locale\ResolverInterface; File: /var/www/html/app/code/Webkul/Marketplace/Model/Order/Pdf/Creditmemo.php

Webkul\Marketplace\Model\Order\Pdf\Shipment Incompatible argument type: Required type: \Magento\Store\Model\App\Emulation. Actual type: \Magento\Framework\Locale\ResolverInterface; File: /var/www/html/app/code/Webkul/Marketplace/Model/Order/Pdf/Shipment.php

    Webkul\Marketplace\Model\Order\Pdf\Invoice
            Incompatible argument type: Required type: \Magento\Store\Model\App\Emulation. Actual type: \Magento\Framework\Locale\ResolverInterface; File:

/var/www/html/app/code/Webkul/Marketplace/Model/Order/Pdf/Invoice.php

2 Answers 2

1

It seems you are using the version of extension which is not compatible with your current Magento version.

The constructor for class Magento\Sales\Model\Order\Pdf\Shipment differs as follows

Magento 2.4.1

public function __construct(
    \Magento\Payment\Helper\Data $paymentData,
    \Magento\Framework\Stdlib\StringUtils $string,
    \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
    \Magento\Framework\Filesystem $filesystem,
    Config $pdfConfig,
    \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory,
    \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory,
    \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
    \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation,
    \Magento\Sales\Model\Order\Address\Renderer $addressRenderer,
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    \Magento\Store\Model\App\Emulation $appEmulation,
    array $data = []
)

Magento 2.3.4

public function __construct(
    \Magento\Payment\Helper\Data $paymentData,
    \Magento\Framework\Stdlib\StringUtils $string,
    \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
    \Magento\Framework\Filesystem $filesystem,
    Config $pdfConfig,
    \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory,
    \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory,
    \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
    \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation,
    \Magento\Sales\Model\Order\Address\Renderer $addressRenderer,
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    \Magento\Framework\Locale\ResolverInterface $localeResolver,
    array $data = []
)
1

Ask the Webkul support team to resolve it for you and also try to find and replace \Magento\Framework\Locale\ResolverInterface with \Magento\Store\Model\App\Emulation because it says that whatever class constructor you are extending (preference) passing required Emulation instead of ResolverInterface

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.