Google has depreciated the reference field.

This is just a little helper script to help you convert your reference fields to the new place_id field.

You'll need to make a few changes to this script for it to work for you.

  1. Change the [YOUR-API-KEY]with your own Google API key
  2. Add the references you need to lookup in the array, see var referencesToMigrate
  3. If you're updating a database, look for var sqlTemplate and change the table and field references