Title: State abbreviation code
Last modified: January 31, 2023

---

# State abbreviation code

 *  Resolved [wdlyons](https://wordpress.org/support/users/wdlyons/)
 * (@wdlyons)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/state-abbreviation-code/)
 * Hi, I was wondering if within the PDF Invoices & Packing Slips for WooCommerce
   is possible to change the state name to the state code on the invoice and Packing
   Slip. For example Victoria to VIC, Western Australia to WA etc
   If so how do I
   go about doing so.
    -  This topic was modified 3 years, 3 months ago by [wdlyons](https://wordpress.org/support/users/wdlyons/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [Yordan Soares](https://wordpress.org/support/users/yordansoares/)
 * (@yordansoares)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/state-abbreviation-code/#post-16426142)
 * Hi [@wdlyons](https://wordpress.org/support/users/wdlyons/),
 * The places names are handled by WooCommerce directly, but you can override this
   using the `woocommerce_states` filter hook, like this:
 *     ```wp-block-code
       /**
        * WooCommerce:
        * Using abbreviations instead of complete names for Australian states
        */
   
       add_filter( 'woocommerce_states', function( $states ) { 
           $states['AU'] = array( // Australian states.
       		'ACT' => 'ACT',
       		'NSW' => 'NSW',
       		'NT'  => 'NT',
       		'QLD' => 'QLD',
       		'SA'  => 'SA',
       		'TAS' => 'TAS',
       		'VIC' => 'VIC',
       		'WA'  => 'WA',
       	);
           return $states;
       }, 10, 1 );
       ```
   
 *  Thread Starter [wdlyons](https://wordpress.org/support/users/wdlyons/)
 * (@wdlyons)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/state-abbreviation-code/#post-16427879)
 * Thank You Yordan for your prompt reply. Much Apppreciated!
   I will give it a go.
 * Cheers
   Warwick
 *  Thread Starter [wdlyons](https://wordpress.org/support/users/wdlyons/)
 * (@wdlyons)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/state-abbreviation-code/#post-16428183)
 * Thanks again Yordan. Just wanted to let you know that worked perfectly. Much 
   Appreciated!
 *  Plugin Contributor [Yordan Soares](https://wordpress.org/support/users/yordansoares/)
 * (@yordansoares)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/state-abbreviation-code/#post-16429058)
 * Hi [@wdlyons](https://wordpress.org/support/users/wdlyons/),
 * Thanks for confirming: I’m glad to hear that it worked!
 * If you don’t mind and have the time, do you think you could [leave us a review](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/#new-post)?
 * Thanks in advance and all the best with your store!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘State abbreviation code’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Yordan Soares](https://wordpress.org/support/users/yordansoares/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/state-abbreviation-code/#post-16429058)
 * Status: resolved