Email notification for new order and cancel order failing.
-
Bagisto version: Latest at time of writing this report.
Hello, some email notifications are failing with the following error:
TypeError: Argument 1 passed to Webkul/Tax/Helpers/Tax::getTaxRatesWithAmount() must implement interface Webkul/Checkout/Contracts/Cart, instance of Webkul/Sales/Models/Order given on line 1
I've debugged the problem and found that the email template is calling
Webkul\Tax\Helpers\Tax::getTaxRatesWithAmount
, which expects receiving an instance ofCart
but the template is sending an instance ofOrder
.The templates affected are:
shop.email.sales.order-cancel
shop.email.sales.new-order
shop.email.sales.new-admin-order
Example template: https://github.com/bagisto/bagisto/blob/master/packages/Webkul/Shop/src/Resources/views/emails/sales/new-order.blade.php#L159
Tax helper:
https://github.com/bagisto/bagisto/blob/master/packages/Webkul/Tax/src/Helpers/Tax.php#L21Thank you.
-
Hello @chemisax
Please mention the framework version along with steps to reproduce, as we are not getting this type of issue.Emails are working fine.