Rename default field names at WooCommerce checkout - Woocommerce Snippets

Woocommerce Oct 03, 2019

If you are looking rename the "state" in Checkout address fields to "county" or "Province", You can try around this simple snippet to do so.

We can use this in renaming any address field name here i am showing an example of renaming "state" to "province".

If you want to rename other fields, just replace ‘state‘ inside the square brackets with:

  • ‘country‘
  • ‘first_name‘
  • ‘last_name‘
  • ‘company‘
  • ‘address_1‘
  • ‘address_2‘
  • ‘city‘
  • ‘postcode‘

How to add this snippet?

You can add this snippet to your child themes functions.php , We don't recommend adding code to your main theme if its not developed by you. Otherwise you can use a simple plugin

Express your views in the comment section below.

Yellamaddi Naveen

Naveen is 22 years old , self-taught Wordpress developer , Currently Working as a Wordpress developer at Upwork.