WooCommerce Shipping – Hide shipping methods based on destination countrySujith
You might be already using one of the awesome WooCommerce shipping solutions of XAdapter. While shipping internationally, you may want to hide specific shipping methods for certain countries. You can hide the shipping method(s) in the cart/checkout page based on the destination country, using the below code snippet.
HIDE WOOCOMMERCE SHIPPING METHODS BASED ON SHIPPING CLASS AND ZONE
Just copy and paste the snippet in Appearance –>Editor –> functions.php and you are done!
If you are looking for a plugin to do this job, visit ELEX Hide Shipping Methods Plugin. Using this plugin, You can easily hide shipping methods based on various conditions.
You have to simply configure the array with the country code as per requirement, and the corresponding shipping method to hide. You can also read this guide on WooCommerce Hide WooCommerce Shipping methods to learn the best ways to do that.