If you're selling to people in different parts of the country or the world, you normally base the tax on the location of the customer. For that reason, you don't normally have to set your own zip code or city. But if you sell to people outside your city most of the time, but also have the Local Pickup shipping method selected, then you'll need to set your zip code and city.
This is an edge case, so there isn't any way to do this in the admin. You have to do this with some custom code, using the following steps:
wp-content/themes/your-theme-name/
, or create a custom WooCommerce plugin.add_filter( 'woocommerce_countries_base_city' , 'woocommerce_cookbook_countries_base_city' ); function 'woocommerce_cookbook_countries_base_city'() { // Replace with your store town/city return 'Townland'; }
Townland
with the name of your city.add_filter( 'woocommerce_countries_base_postcode' , 'woocommerce_cookbook_countries_base_postcode' ); function woocommerce_cookbook_countries_base_postcode() { // Replace with your store postcode / zipcode return '45040'; }
45040
with your actual zip code.Now that you've set your city and zip code, the Local Pickup method will use those for taxation. You still need to set the rates. See the Manually entering tax rates recipe we've covered earlier.