What can I do if I want to deselect the shipping method when the page is reloaded or if you go back to cart/categories/etc and after you go back to checkout? Right now if I selected a shipping method will remain selected until I change the county. Until now I tried this solution: How to deselect shipping method in M2 and I also modified in the file vendor/magento/module-checkout/view/frontend/web/js/model/checkout-data-resolver.js
the function resolveShippingRates
where I tried to put selectShippingMethodAction(null)
at the beginning or like this:
if (ratesData.length > 1) {
selectShippingMethodAction(null);
return;
}
But nothing works. When I put it in that if it works fine if you were logged in but I couldn’t go to the next step if I wasn’t.