how to off free shipping for specific states.
Example:
I have free shipping for all items over item total $100.
I do not want to have free shipping for USA state of Hawaii, Alaska.
Please advice.
Thank you,
On select of state create a function in js onclick=myfunction()
in that function get your current shipping information from quote and apply
if(shipping_state == 'Hawaii')
//refresh whole shipping details
var processors = [];
rateRegistry.set(quote.shippingAddress().getCacheKey(), null);
processors.default = defaultProcessor;
processors['customer-address'] = customerAddressProcessor;
var type = quote.shippingAddress().getType();
if (processors[type]) {
processors[type].getRates(quote.shippingAddress());
} else {
processors.default.getRates(quote.shippingAddress());
}
}
in this if hide that shipping method and refresh the whole shipping details hope you get my point upvote if helps