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(2y ago)042proprietaryPHPPHP &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 today

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

22

—

LowBetter than 21% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity8

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

759d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/37470506?v=4)[WiljeOnline](/maintainers/wiljeonline)[@wiljeonline](https://github.com/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

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k13](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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