Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove Russia from WooCommerce checkout fields.
add_filter( 'woocommerce_countries_allowed_countries', 'wc_ban_russia' );
function wc_ban_russia( $countries ) {
if ( isset( $countries['RU'] ) ) {
unset( $countries['RU'] );
}
return $countries;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment