I implemented the functionality of editing a customer address in checkout using AJAX. Everything works as expected for the shipping address, as it is updated automatically, but I can’t figure out how to update the billing address dropdown without refreshing the page.
If I refresh the checkout page, the billing address dropdown is correctly populated. Also, I checked the quote, and the billing address is updated accordingly after updating the address, but from a UI perspective, I can’t update the dropdown values in real time.
For updating the address I built a custom module and overwritten the saveNewAddress method, updating the address through a custom API endpoint and then selecting the address using selectShippingAddress(newAddress). After that, I updated the addressList() with the new details.
For the billing address, I tried to make changes in vendor/magento/module-checkout/view/frontend/web/js/view/billing-address/list.js, trying to update the addressOptions property but had no success. Also, I was looking for something that could reload the billing address but had no success as well.
How can I update the billing address dropdown in checkout without refreshing the page after successfully updating the shipping address?
Thank you!