shipperhq / module-shipper

Base ShipperHQ Repo
Open Software License 3.0
21 stars 21 forks source link

Potential issue with 2.2.4 and extension attribute #44

Closed Silarn closed 6 years ago

Silarn commented 6 years ago

In the Observer\SaveEmailVariables class, a call is made to getShipperhqCarrierGroupDetails.

Since this extension attribute is undefined, this method fails because it can't find the getter/setter functions.

You can fix it by defining a new extension attribute:

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Quote\Api\Data\ShippingMethodInterface">
        <attribute code="tooltip" type="string"/>
    </extension_attributes>
    <extension_attributes for="Magento\Sales\Api\Data\OrderInterface">
        <attribute code="shipperhq_carrier_group_details" type="string[]"/>
    </extension_attributes>
</config>
wsajosh commented 6 years ago

Hi @Silarn

Thanks for raising this. We've just released update 20.18.8 which resolves this. Please update and retest.

Silarn commented 6 years ago

Thanks, will give it a try.