public function aroundExecute(
        \Temando\Shipping\Observer\SaveCheckoutFieldsObserver $subject,
        \Closure $proceed,
        \Magento\Framework\Event\Observer $observer
    ) {
        /** @var \Magento\Quote\Api\Data\AddressInterface|\Magento\Quote\Model\Quote\Address $quoteAddress */
        $quoteAddress = $observer->getData('quote_address');
        if ($quoteAddress->getAddressType() !== \Magento\Quote\Model\Quote\Address::ADDRESS_TYPE_SHIPPING) {
            return;
        }

        if (!$quoteAddress->getExtensionAttributes()) {
            return;
        }

        if (!$quoteAddress->getExtensionAttributes()->getCheckoutFields()) {
            return;
        }

        $proceed($observer);
    }
public function aroundExecute(
        \Temando\Shipping\Observer\SaveCheckoutFieldsObserver $subject,
        \Closure $proceed,
        \Magento\Framework\Event\Observer $observer
    ) {
        /** @var \Magento\Quote\Api\Data\AddressInterface|\Magento\Quote\Model\Quote\Address $quoteAddress */
        $quoteAddress = $observer->getData('quote_address');
        if ($quoteAddress->getAddressType() !== \Magento\Quote\Model\Quote\Address::ADDRESS_TYPE_SHIPPING) {
            return;
        }

        if (!$quoteAddress->getExtensionAttributes()) {
            return;
        }

        if (!$quoteAddress->getExtensionAttributes()->getCheckoutFields()) {
            return;
        }

        $proceed($observer);
    }
public function aroundExecute ( \ Temando \ Shipping \ Observer \ SaveCheckoutFieldsObserver $ subject , \ Closure $ proceed , \ Magento \ Framework \ Event \ Observer $ observer ) { /** @var \Magento\Quote\Api\Data\AddressInterface|\Magento\Quote\Model\Quote\Address $quoteAddress */ $ quoteAddress = $ observer -> getData ( 'quote_address' ) ; if ( $ quoteAddress -> getAddressType ( ) !== \ Magento \ Quote \ Model \ Quote \ Address :: ADDRESS_TYPE_SHIPPING ) { return ; } if ( ! $ quoteAddress -> getExtensionAttributes ( ) ) { return ; } if ( ! $ quoteAddress -> getExtensionAttributes ( ) -> getCheckoutFields ( ) ) { return ; } $ proceed ( $ observer ) ; }
Better check than what is done in the Temando Observer which is thinking he is the only one adding extension
attributes to the Quote address.

@SuppressWarnings(PHPMD.UnusedFormalParameter)

@param \Temando\Shipping\Observer\SaveCheckoutFieldsObserver $subject  Base Temando Observer
@param \Closure                                              $proceed  execute() method of Temando Observer
@param \Magento\Framework\Event\Observer                     $observer Magento Event Observer
Better check than what is done in the Temando Observer which is thinking he is the only one adding extension attributes to the Quote address .