Needed a way to get a shipping zone ID for custom email template so I could set different email content based on where the order was being shipped to.
This particular piece of code went to the customer-completed-order.php file within the theme's woocommerce template folder.
Disclaimer:
- This code works for me just fine, it should work for you as well. If it doesn't, you may need to update it to reflect your own unique WordPress/WooCommerce environment and versions.
- Use it at your own risk. I will not be held responsible if you add the code and it breaks your website. Always backup your website before fiddling with its code.