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!
You have to simply configure the array with the country code as per requirement, and the corresponding shipping method to hide.