WooCommerce set a min order price for a single country [closed]

Looking at your code I think you have enabled checkout only for logged in users because you won’t get the country otherwise. If that’s the fact then you just need to change your if condition from if( is_cart() || is_checkout() ) to if( ( is_cart() || is_checkout()) && "UK" == WC()->customer->shipping_country ) and put global $woocommerce before the if condition. Rest of the code is correct & working fine.