/**
  * Statically update customer data
  * @param $data
  * @return bool|string
  */
 public static function updateCustomerData($data)
 {
     $settings = WposAdminSettings::getSettingsObject('general');
     $custMdl = new CustomerModel();
     $gid = null;
     if ($settings->gcontact == 1) {
         // get google id
         $gid = $custMdl->get($data->id)[0]['googleid'];
         if ($gid) {
             // edit google
             $gres = GoogleIntergration::setGoogleContact($settings, $data, $gid);
         } else {
             // add google
             $gres = GoogleIntergration::setGoogleContact($settings, $data);
         }
         if ($gres[0] == true) {
             $gid = $gres[1];
         }
     }
     $qresult = $custMdl->edit($data->id, $data->email, $data->name, $data->phone, $data->mobile, $data->address, $data->suburb, $data->postcode, $data->state, $data->country, $data->notes, $gid);
     if ($qresult === false) {
         return "Could not edit the customer: " . $custMdl->errorInfo;
     } else {
         // log data
         Logger::write("Customer updated with id:" . $data->id, "CUSTOMER", json_encode($data));
         return true;
     }
 }