Created
June 15, 2018 16:58
-
-
Save lukecav/dbf1674a0ba6f6937ce22f9d35d19eb5 to your computer and use it in GitHub Desktop.
Remove specific country from WooCommerce country list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wc_remove_specific_country( $country ) | |
{ | |
unset($country["PR"]); | |
return $country; | |
} | |
add_filter( 'woocommerce_countries', 'wc_remove_specific_country', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks, very useful for multisite and WaaS environments