PHPackages                             wiljeonline/google-places - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. wiljeonline/google-places

ActiveLibrary[API Development](/categories/api)

wiljeonline/google-places
=========================

Just a simple PHP class we use in our projects for the Google Places API.

0.0.5(1y ago)142proprietaryPHPPHP &gt;=8.0.0

Since Apr 3Pushed 1y agoCompare

[ Source](https://github.com/wiljeonline/google-places)[ Packagist](https://packagist.org/packages/wiljeonline/google-places)[ RSS](/packages/wiljeonline-google-places/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (4)Used By (0)

Wilje Online Google Places
==========================

[](#wilje-online-google-places)

Just a simple PHP class we use in our projects for the Google Places API.

License: Apache 2.0

Installation
============

[](#installation)

1. Set up the Google API
------------------------

[](#1-set-up-the-google-api)

**Set up the Google Places API**We need to enable the **Places API**. Setup:

**Get Google Place ID**Get the Google Place ID for the place ID you want to use.

The easiest option is to use this website: .

2. Set the API keys in your project
-----------------------------------

[](#2-set-the-api-keys-in-your-project)

When you have your API and keys setup, we use roughly one of two types of settings.

### Option 1. Set API keys via PHP Constants (safest)\*

[](#option-1-set-api-keys-via-php-constants-safest)

Follow these steps:

- Set a constant named WO\_GOOGLE\_PLACE\_ID in wp-config.php and fill in your Place ID
- Set a constant named WO\_GOOGLE\_PLACES\_API\_KEY in wp-config.php and fill in your API key

### Option 2. Set API keys via ACF Settings fields (safe enough)

[](#option-2-set-api-keys-via-acf-settings-fields-safe-enough)

Follow these steps:

- Install and active Advanced Custom Fields Pro
- Set up two ACF settings fields named wo\_google\_place\_id &amp; wo\_google\_places\_api\_key
- Set them as options in an ACF options page
- Fill in the Google Place ID and API key in the options pages and save the settings

Example usage of the class
--------------------------

[](#example-usage-of-the-class)

You can now use the class as follows:

### Get all the place details

[](#get-all-the-place-details)

```
use WiljeOnline\GooglePlaces;

$googlePlaces = new GooglePlaces;
$placeDetails = $googlePlaces->getPlaceDetails();
```

### Get the reviews

[](#get-the-reviews)

```
use WiljeOnline\GooglePlaces;

$googlePlaces = new GooglePlaces;
$reviews = $googlePlaces->getReviews();
```

### Get the aggregated rating

[](#get-the-aggregated-rating)

```
use WiljeOnline\GooglePlaces;

$googlePlaces = new GooglePlaces;
$aggregatedRating = $googlePlaces->getAggregatedRating();
```

Usage in your theme
-------------------

[](#usage-in-your-theme)

You can now get the reviews and aggregated ratings through the WordPress options. The settings are saved as options and will be deleted when cron runs (once daily). The class is set up with a cron job that runs twice daily to fetch the new data.

**Get the options**

```
$reviews = get_option('wo_reviews');

if( $reviews ) {
    // Do something with the reviews.
}
```

Authors
-------

[](#authors)

- [@jeroen-mulder](https://www.github.com/jeroen-mulder)

License
-------

[](#license)

[Apache 2.0](https://choosealicense.com/licenses/apache-2.0)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~30 days

Total

3

Last Release

708d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/63d171684d983b63336dba818bdb58525a050f98540c144cb7ffec26bff96a6d?d=identicon)[wiljeonline](/maintainers/wiljeonline)

---

Top Contributors

[![jeroen-mulder](https://avatars.githubusercontent.com/u/58421048?v=4)](https://github.com/jeroen-mulder "jeroen-mulder (4 commits)")

### Embed Badge

![Health badge](/badges/wiljeonline-google-places/health.svg)

```
[![Health](https://phpackages.com/badges/wiljeonline-google-places/health.svg)](https://phpackages.com/packages/wiljeonline-google-places)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
