Last active
October 30, 2023 07:25
-
-
Save SirDarcanos/cccb3adb7d4e1739d43512fe4f95cfa0 to your computer and use it in GitHub Desktop.
Remove Russia from WooCommerce checkout fields.
This file contains hidden or 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
<?php | |
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