Support » Plugin: WP_Places » Ability to turn off Google API fields

  • I am running into this same issue for our website as winthropweb. We are getting charged astronomical fees by Google. The WP_Places plugin is pulling all the API data and we really only want to make use of one field which is “Hours” for our website. It would be great if there was a way from with the plugin settings to restrict what is being pulled from Google’s API. For example allow the web developer to choose via a checkbox which fields to turn on or off. This plugin is a great resource and helps smaller organizations with connecting to their customers by providing up to date information on their websitethese organizations a great deal.

    Also, I wanted to donate to the plugin in hopes that you would consider this feature. The link to donate at http://www.fostercloset.org/Donate.html is broken.
    I would really appreciate any feedback, advice or direction from you Mr. Binary. Much Thanks for the plugin!

Viewing 1 replies (of 1 total)
  • Plugin Author Gary Kovar

    (@binarygary)

    My apologies. This plugin had not been updated in quite a while as I’ve been busy with quite a few other things. In that time, google dramatically increased their rates.
    For now a bandaid fix is available in version 2.1.2 until I can find time to dig in further.

    In your functions.php in your theme add:

    add_filter( ‘wp_places_transient’, ‘wp_places_update_transient’, 10, 1 );
    wp_places_update_transient( $time ) {
    // return a value in seconds for how long to cache.
    return 86400; // one day
    return 604800 // one week
    }

    Return however long you’d like the transient to exist. This is not full proof, but better than checking every minute if a place is open.

Viewing 1 replies (of 1 total)
  • The topic ‘Ability to turn off Google API fields’ is closed to new replies.