Title: ZIP Code before City
Last modified: April 10, 2021

---

# ZIP Code before City

 *  [marylinedis](https://wordpress.org/support/users/marylinedis/)
 * (@marylinedis)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/zip-code-before-city-3/)
 * Hi,
    I have been using the plugin successfully for several months but there is
   an issue that I would like to resolve. I want the ZIP code to be displayed before
   the city name. I found out how to do this by modifying the PDFBillingAll.php 
   and PDFShippingAll.php files as follows:
 *     ```
       private function CreateCityStateZipRow(&$table,$format)
           {
               if($this->orderValueRetriever->useTestData)
               {
                   $city=$this->GetTestValue('City');
                   $state=$this->GetTestValue('State');
                   $zip=$this->GetTestValue('Zip');
               }else
               {
                   $city=$this->GetValue('City');
                   $state=$this->GetValue('State');
                   $zip=$this->GetValue('Zip');
               }
   
               $value='';
   
   
       		if($this->GetBooleanValue('showZip'))
   
                   $value.= $zip;
   
   
       		if($this->GetBooleanValue('showCity'))
       		   {
                   if (strlen($value) > 0&&strlen($city)>0)
                       $value.=" ";
                   $value .=$city;
       		   }
   
               if($this->GetBooleanValue('showState'))
               {
                   if (strlen($value) > 0&&strlen($state)>0)
                       $value.=", ";
                   $value .= $state;
               }
   
               if($format=='plain')
               {
                   if(trim($value)!='')
                   {
                       if($table!='')
                           $table.=', ';
                   }
   
                   $table.=$value;
               }else
                   $table.=$this->CreateRow('CityStateZip',$value);
   
           }
       ```
   
 * It works but the problem is that each time a new update is downloaded, these 
   2 .php files revert to the initial state.
    What can I do to avoid having to manually
   correct these 2 files for each update? Thank you very much in advance.
    -  This topic was modified 5 years, 1 month ago by [marylinedis](https://wordpress.org/support/users/marylinedis/).

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

 *  [hans80](https://wordpress.org/support/users/hans80/)
 * (@hans80)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/zip-code-before-city-3/#post-14342705)
 * Hello my friend
 * I also use this great plugin and had the same problem as you.
    I found the solution
   here: [https://wooinvoice.rednao.com/knowledge-base/customize-address-format/](https://wooinvoice.rednao.com/knowledge-base/customize-address-format/)
 *  Thread Starter [marylinedis](https://wordpress.org/support/users/marylinedis/)
 * (@marylinedis)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/zip-code-before-city-3/#post-14347861)
 * Hi hans80,
    Thank you for your answer, sadly I use the free version so I can’t
   use this method

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

The topic ‘ZIP Code before City’ is closed to new replies.

 * ![](https://ps.w.org/woo-pdf-invoice-builder/assets/icon-256x256.gif?rev=3517675)
 * [PDF Builder for WooCommerce. Create invoices,packing slips and more](https://wordpress.org/plugins/woo-pdf-invoice-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-pdf-invoice-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-pdf-invoice-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-pdf-invoice-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-pdf-invoice-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-pdf-invoice-builder/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [marylinedis](https://wordpress.org/support/users/marylinedis/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/zip-code-before-city-3/#post-14347861)
 * Status: not resolved