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 shipping method(s) in the cart/checkout page based on destination country, using the below code snippet.
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.