}
}
+ if ($contactID && isset($_REQUEST['billing_city']) && $_REQUEST['billing_city'] == -1 && isset($_REQUEST['newBillingCityName']) && trim($_REQUEST['newBillingCityName']) != '') {
+ // Clean up city name
+ $cName = trim(filter_var($_REQUEST['newBillingCityName']));
+ // Try to add the city
+ require_once GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataCities.php';
+ $Cities = new GlmDataCities($this->wpdb, $this->config);
+ $cID = $Cities->addCity($cName);
+ // If we got a city id back
+ if (is_int($cID) && $cID > 0) {
+ // Update submitted city value to use the new ID
+ $_REQUEST['billing_city'] = $cID;
+ }
+ }
}
/*