I am pretty new to Magento but I am in the process of building out a plugin that will eventually validate a user's shipping address and then update the user's shipping address on the payment screen.

My plugin seems to be firing fine as I can write to the log and see the updated address in the quote_address table but the address is not updated on the payment screen. Can someone point out what I am missing here?

Old address on Payment Screen:

enter image description here

Plugin Code:

public function beforeSaveAddressInformation(
    \Magento\Checkout\Model\ShippingInformationManagement $subject,
    \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation
    $addressInformation->getShippingAddress()->setStreet("123 Updated Rd");
    $addressInformation->getBillingAddress()->setStreet("123 Updated Rd");

    $return = [$cartId, $addressInformation];

    return $return;


After digging into this further, I believe this is a front-end cache issue. I've attempted to reload the cache but that doesn't seem to do anything. Any suggestions on where or how to reload the cache on the front-end would be appreciated. In my custom plugin, I've overridden the checkout-data.js file and added a custom function that seems like it should reload the cache from the server but I've not had any luck with it.

getRefreshedData = function () {
            let sections = ['checkout-data'];
            storage.reload(sections, true);
            var data = storage.get(cacheKey)();
            return data;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.