Skip to content

Instantly share code, notes, and snippets.

Created March 4, 2022 06:05
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