Skip to content

Instantly share code, notes, and snippets.

@aatronco
Last active November 21, 2018 18:45
Show Gist options
  • Save aatronco/314d85be73dc3a4432a2f8ef4ca44ad8 to your computer and use it in GitHub Desktop.
Save aatronco/314d85be73dc3a4432a2f8ef4ca44ad8 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
var shipping_to = ["12","03"]; //hides all regiones not included in this array
setTimeout(function(){
$('#estimate_shipping_region option').filter(function() {
return $.inArray($.trim($(this).val()), shipping_to) == -1;
}).remove();
}, 1000);
$("#estimate_shipping_region").change();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment