RESTRICT THE LIST OF COUNTRIES IN THE DROP-DOWN MENU FOR CALCULATING SHIPPING
Question:
Can we restrict the list of countries in the drop-down menu for calculating shipping in the slide-out cart, or set it to default to the United States?
Solution:
Yes, you can restrict the list of countries to just the United States and Canada in the shipping calculation drop-down menu. Add the following CSS code to your custom.css file:
#shipping-rates-modal-country option {
display: none;
}
#shipping-rates-modal-country option[value="United States"],
#shipping-rates-modal-country option[value="Canada"] {
display: block;
}
for example this code hides all country options except for the United States and Canada.

Last updated