I think its better to do it by JS.
// hide country field for UK
$(document.body).on("updated_checkout", function (e) {
var sm_selected_country = $("#billing_country").val();
console.log("selected county", sm_selected_country);
if (sm_selected_country && sm_selected_country === "GB") {
$("#billing_state_field").addClass("d-none");
} else {
$("#billing_state_field").removeClass("d-none");
}
});
-
This reply was modified 4 years ago by coder618.