Title: [Plugin: SimpleMap Store Locator] updating the zip code doesn&#039;t work
Last modified: August 20, 2016

---

# [Plugin: SimpleMap Store Locator] updating the zip code doesn't work

 *  [mrose17](https://wordpress.org/support/users/mrose17/)
 * (@mrose17)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-simplemap-store-locator-updating-the-zip-code-doesnt-work/)
 * the usps allows postal codes that start with 0
    + excel likes to strip leading
   0’s from cells that are entirely numeric + unknowingly import csv via simplemaps
   = zip code without leading 0
 * now try to edit location to fix it! not possible. why? because in locations.php,
   the test is:
 *  if ( $location_zip != $new_zip ) update_post_meta( $post, ‘location_zip’, $new_zip);
 * which php helpfully views as a numeric comparision
 * [http://wordpress.org/extend/plugins/simplemap/](http://wordpress.org/extend/plugins/simplemap/)

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

 *  [sannsllc](https://wordpress.org/support/users/sannsllc/)
 * (@sannsllc)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-simplemap-store-locator-updating-the-zip-code-doesnt-work/#post-2315677)
 * Why not try exporting your database back to Excel, use the special formatting
   for zipcodes (which re-inserts the leading 0), re-converting back to csv, delete
   the simplemaps database and then re-import the data to reconstitute the simplemaps
   database?
 * Then the comparison above would be moot.
 *  Thread Starter [mrose17](https://wordpress.org/support/users/mrose17/)
 * (@mrose17)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-simplemap-store-locator-updating-the-zip-code-doesnt-work/#post-2315678)
 * that would certain solve the problem for me this time. i don’t think it’s particularly
   helpful for the next N people who have the same thing happen to them…
 * i addressed the issue by modifying the code. that may not be ideal, but now i
   don’t have to worry about remembering to tinker with the excel files that are
   sent to me for inclusion in the site…
 *  [abelcreative](https://wordpress.org/support/users/abelcreative/)
 * (@abelcreative)
 * [14 years ago](https://wordpress.org/support/topic/plugin-simplemap-store-locator-updating-the-zip-code-doesnt-work/#post-2315704)
 * would you mind posting your fix? I have this same problem. Is it as easy as removing
   that one line?
 *  Thread Starter [mrose17](https://wordpress.org/support/users/mrose17/)
 * (@mrose17)
 * [14 years ago](https://wordpress.org/support/topic/plugin-simplemap-store-locator-updating-the-zip-code-doesnt-work/#post-2315705)
 * i hope this helps. you don’t remove a line, but you change it subtly:
 * in classes/locations.php:
 * – if ( $location_zip != $new_zip ) update_post_meta( $post, ‘location_zip’, $
   new_zip );
    + if ( “$location_zip” !== “$new_zip” ) update_post_meta( $post, ‘
   location_zip’, $new_zip );

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

The topic ‘[Plugin: SimpleMap Store Locator] updating the zip code doesn't work’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simplemap_cca5a5.svg)
 * [SimpleMap Store Locator](https://wordpress.org/plugins/simplemap/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simplemap/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simplemap/)
 * [Active Topics](https://wordpress.org/support/plugin/simplemap/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simplemap/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simplemap/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [mrose17](https://wordpress.org/support/users/mrose17/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/plugin-simplemap-store-locator-updating-the-zip-code-doesnt-work/#post-2315705)
 * Status: not resolved